initial commit
This commit is contained in:
19
rust/src/util.rs
Normal file
19
rust/src/util.rs
Normal file
@ -0,0 +1,19 @@
|
||||
use std::path::PathBuf;
|
||||
use directories::ProjectDirs;
|
||||
|
||||
pub fn get_dirs() -> ProjectDirs {
|
||||
ProjectDirs::from("org", "7EVENDAYSHOLIDAYS", "STARTLINER")
|
||||
.expect("Unable to set up config directories")
|
||||
}
|
||||
|
||||
pub fn config_dir() -> PathBuf {
|
||||
get_dirs().config_dir().to_owned()
|
||||
}
|
||||
|
||||
pub fn pkg_dir() -> PathBuf {
|
||||
get_dirs().data_dir().join("pkg").to_owned()
|
||||
}
|
||||
|
||||
pub fn cache_dir() -> PathBuf {
|
||||
get_dirs().cache_dir().to_owned()
|
||||
}
|
Reference in New Issue
Block a user