Initial public release

This commit is contained in:
Bohdan Triapitsyn
2025-12-07 19:32:53 +02:00
commit 4b2edf7318
319 changed files with 81600 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
use std::path::PathBuf;
#[cfg(target_os = "macos")]
const PLATFORM_LOG_SEGMENTS: &[&str] = &["Library", "Logs", "OpenChamber"];
#[cfg(not(target_os = "macos"))]
const PLATFORM_LOG_SEGMENTS: &[&str] = &[".config", "openchamber", "logs"];
pub fn log_directory() -> Option<PathBuf> {
let mut path = dirs::home_dir()?;
for segment in PLATFORM_LOG_SEGMENTS {
path.push(segment);
}
Some(path)
}
pub fn log_file_path() -> Option<PathBuf> {
let mut dir = log_directory()?;
dir.push("desktop.log");
Some(dir)
}