initial commit

This commit is contained in:
2025-02-12 22:13:31 +01:00
commit 047b2e9f4a
52 changed files with 8552 additions and 0 deletions

19
rust/src/util.rs Normal file
View 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()
}