diff options
author | rabite <rabite@posteo.de> | 2019-03-15 14:22:05 +0100 |
---|---|---|
committer | rabite <rabite@posteo.de> | 2019-03-15 14:29:23 +0100 |
commit | 297239c7c7cd9949f3f5d4efd03ba163ab3bd8d7 (patch) | |
tree | 49883c4fba910b6502456eb8164b313328b5bef1 /src/paths.rs | |
parent | 370064387b6707a8b4b67ff9f55400a87b9c7356 (diff) |
log/foldview
Diffstat (limited to 'src/paths.rs')
-rw-r--r-- | src/paths.rs | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/paths.rs b/src/paths.rs new file mode 100644 index 0000000..be40658 --- /dev/null +++ b/src/paths.rs @@ -0,0 +1,29 @@ +use dirs_2; + +use std::path::PathBuf; + +use crate::fail::HResult; + +pub fn hunter_path() -> HResult<PathBuf> { + let mut config_dir = dirs_2::config_dir()?; + config_dir.push("hunter/"); + Ok(config_dir) +} + +pub fn bookmark_path() -> HResult<PathBuf> { + let mut bookmark_path = hunter_path()?; + bookmark_path.push("bookmarks"); + Ok(bookmark_path) +} + +pub fn tagfile_path() -> HResult<PathBuf> { + let mut tagfile_path = hunter_path()?; + tagfile_path.push("tags"); + Ok(tagfile_path) +} + +pub fn history_path() -> HResult<PathBuf> { + let mut history_path = hunter_path()?; + history_path.push("history"); + Ok(history_path) +} |