Mountain/IPC/WindServiceHandlers/Utilities/UserdataDir/Get.rs
1//! Returns the userdata base directory, falling back to platform defaults.
2
3pub fn Fn() -> String {
4 if let Some(Dir) = super::BASE_DIR.get() {
5 return Dir.clone();
6 }
7
8 if let Ok(Home) = std::env::var("HOME") {
9 #[cfg(target_os = "macos")]
10 return format!("{}/Library/Application Support/Land", Home);
11
12 #[cfg(target_os = "linux")]
13 return format!("{}/.local/share/Land", Home);
14 }
15
16 "/tmp/Land".to_string()
17}