asimov_signal_module/
path.rs1use asimov_module::getenv;
4use std::path::PathBuf;
5
6#[cfg(unix)]
7pub fn default_signal_path() -> PathBuf {
10 let mut result: PathBuf = getenv::home().unwrap().into();
11 #[cfg(target_os = "macos")]
12 result.push("Library/Application Support/Signal");
13 #[cfg(not(target_os = "macos"))]
14 result.push(".config/Signal");
15 result
16}
17
18#[cfg(windows)]
19pub fn default_signal_path() -> PathBuf {
22 let mut result: PathBuf = getenv::appdata().unwrap().into();
23 #[cfg(target_os = "windows")]
24 result.push(r"Roaming\Signal");
25 result
26}
27
28#[cfg(all(not(unix), not(windows)))]
29pub fn default_signal_path() -> PathBuf {
30 todo!("implement default_signal_path for this platform") }