use std::path::PathBuf;
use credent_fs_model::{AppName, Error};
pub const CREDENTIALS_FILE_NAME: &str = "credentials";
#[derive(Debug)]
pub struct CredentialsFile;
impl CredentialsFile {
pub fn path(app_name: AppName<'_>) -> Result<PathBuf, Error> {
dirs::config_dir()
.map(|config_dir| config_dir.join(*app_name).join(CREDENTIALS_FILE_NAME))
.ok_or(Error::UserConfigDirNotFound)
}
}