Debian Codegraph @

src/mac.rs

raw symbols SCIP
1 use std::path::PathBuf;
2
3 pub fn home_dir() -> Option<PathBuf> { dirs_sys_next::home_dir() }
4 pub fn cache_dir() -> Option<PathBuf> { home_dir().map(|h| h.join("Library/Caches")) }
5 pub fn config_dir() -> Option<PathBuf> { data_dir() }
6 pub fn data_dir() -> Option<PathBuf> { home_dir().map(|h| h.join("Library/Application Support")) }
7 pub fn data_local_dir() -> Option<PathBuf> { data_dir() }
8 pub fn executable_dir() -> Option<PathBuf> { None }
9 pub fn runtime_dir() -> Option<PathBuf> { None }
10 pub fn audio_dir() -> Option<PathBuf> { home_dir().map(|h| h.join("Music")) }
11 pub fn desktop_dir() -> Option<PathBuf> { home_dir().map(|h| h.join("Desktop")) }
12 pub fn document_dir() -> Option<PathBuf> { home_dir().map(|h| h.join("Documents")) }
13 pub fn download_dir() -> Option<PathBuf> { home_dir().map(|h| h.join("Downloads")) }
14 pub fn font_dir() -> Option<PathBuf> { home_dir().map(|h| h.join("Library/Fonts")) }
15 pub fn picture_dir() -> Option<PathBuf> { home_dir().map(|h| h.join("Pictures")) }
16 pub fn public_dir() -> Option<PathBuf> { home_dir().map(|h| h.join("Public")) }
17 pub fn template_dir() -> Option<PathBuf> { None }
18 pub fn video_dir() -> Option<PathBuf> { home_dir().map(|h| h.join("Movies")) }