feat: current state
validate / macos-arm64 (push) Canceled after 0s
validate / windows-x86_64 (push) Canceled after 0s

This commit is contained in:
Louis Frei
2026-08-13 20:18:30 +02:00
parent 42fc9ee2dc
commit 8dda5dcf23
42 changed files with 5155 additions and 82 deletions
+23 -2
View File
@@ -1,2 +1,23 @@
pub struct AppPaths;
impl AppPaths { pub fn discover() -> Self { Self } }
use crate::error::{AppError, SafeError};
use directories::ProjectDirs;
use std::path::PathBuf;
#[derive(Debug, Clone)]
pub struct AppPaths {
config_dir: PathBuf,
}
impl AppPaths {
pub fn discover() -> Result<Self, AppError> {
let dirs = ProjectDirs::from("com", "azure", "azure-database-tui").ok_or_else(|| {
AppError(SafeError::configuration(
"Application configuration directory is unavailable",
))
})?;
Ok(Self {
config_dir: dirs.config_dir().to_path_buf(),
})
}
pub fn profiles_path(&self) -> PathBuf {
self.config_dir.join("profiles.json")
}
}