use std::path::PathBuf; pub fn get_data_dir() -> Option { dirs::data_dir().map(|f| f.join("tfclient/")) } pub fn get_config_dir(instance: &str) -> Option { dirs::config_dir().map(|f| f.join("tfclient/").join(format!("{}/", instance))) } pub fn get_config_file(instance: &str) -> Option { get_config_dir(instance).map(|f| f.join("tfclient.toml")) } pub fn get_cdata_dir(instance: &str) -> Option { dirs::config_dir().map(|f| f.join("tfclient_data/").join(format!("{}/", instance))) } pub fn get_cdata_file(instance: &str) -> Option { get_cdata_dir(instance).map(|f| f.join("tfclient.toml")) } pub fn get_nebulaconfig_file(instance: &str) -> Option { get_cdata_dir(instance).map(|f| f.join("nebula.sk_embedded.yml")) }