]> git.proxmox.com Git - rustc.git/blame - vendor/dirs-next/src/mac.rs
New upstream version 1.52.1+dfsg1
[rustc.git] / vendor / dirs-next / src / mac.rs
CommitLineData
f20569fa
XL
1use std::path::PathBuf;
2
3pub fn home_dir() -> Option<PathBuf> { dirs_sys_next::home_dir() }
4pub fn cache_dir() -> Option<PathBuf> { home_dir().map(|h| h.join("Library/Caches")) }
5pub fn config_dir() -> Option<PathBuf> { data_dir() }
6pub fn data_dir() -> Option<PathBuf> { home_dir().map(|h| h.join("Library/Application Support")) }
7pub fn data_local_dir() -> Option<PathBuf> { data_dir() }
8pub fn executable_dir() -> Option<PathBuf> { None }
9pub fn runtime_dir() -> Option<PathBuf> { None }
10pub fn audio_dir() -> Option<PathBuf> { home_dir().map(|h| h.join("Music")) }
11pub fn desktop_dir() -> Option<PathBuf> { home_dir().map(|h| h.join("Desktop")) }
12pub fn document_dir() -> Option<PathBuf> { home_dir().map(|h| h.join("Documents")) }
13pub fn download_dir() -> Option<PathBuf> { home_dir().map(|h| h.join("Downloads")) }
14pub fn font_dir() -> Option<PathBuf> { home_dir().map(|h| h.join("Library/Fonts")) }
15pub fn picture_dir() -> Option<PathBuf> { home_dir().map(|h| h.join("Pictures")) }
16pub fn public_dir() -> Option<PathBuf> { home_dir().map(|h| h.join("Public")) }
17pub fn template_dir() -> Option<PathBuf> { None }
18pub fn video_dir() -> Option<PathBuf> { home_dir().map(|h| h.join("Movies")) }