diff options
Diffstat (limited to 'src/config.rs')
| -rw-r--r-- | src/config.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/config.rs b/src/config.rs new file mode 100644 index 0000000..1f3a846 --- /dev/null +++ b/src/config.rs @@ -0,0 +1,11 @@ +use std::path::{Path, PathBuf}; + +pub fn cookies_file() -> PathBuf { + let exe = std::env::current_exe().unwrap(); + exe.parent().unwrap_or(Path::new(".")).join("cookies.json") +} + +pub fn books_root() -> PathBuf { + let exe = std::env::current_exe().unwrap(); + exe.parent().unwrap_or(Path::new(".")).join("Books") +} |
