feat: etc

This commit is contained in:
2025-02-27 02:11:37 +01:00
parent 1586f81152
commit 947b384511
18 changed files with 263 additions and 146 deletions

View File

@ -2,8 +2,6 @@ use anyhow::{anyhow, Result};
use directories::ProjectDirs;
use std::path::{Path, PathBuf};
use crate::profile::Profile;
pub fn get_dirs() -> ProjectDirs {
ProjectDirs::from("org", "7EVENDAYSHOLIDAYS", "STARTLINER")
.expect("Unable to set up config directories")
@ -21,13 +19,6 @@ pub fn pkg_dir_of(namespace: &str, name: &str) -> PathBuf {
pkg_dir().join(format!("{}-{}", namespace, name)).to_owned()
}
pub fn profile_dir(p: &Profile) -> PathBuf {
get_dirs()
.data_dir()
.join("profile-".to_owned() + &p.name)
.to_owned()
}
pub fn cache_dir() -> PathBuf {
get_dirs().cache_dir().to_owned()
}