plat/apple_sys.rs (Apple)#
Source: lib/plat/apple_sys.rs
apple_sys -- files, directories and well-known paths on macOS and iOS (libSystem; the same
functions as linux_sys.rs, whose comments say what each one promises)
No static buffers: every function may run on any thread. OsFile::read_at / write_at are pread /
pwrite, so several threads may use one file at the same time. sync is F_FULLFSYNC: on Apple a
plain fsync leaves the data in the drive's cache.
fn dev_ino(path: &str) -> Option<(u64, u64)>(st_dev, st_ino) of a path (links followed), None when it cannot be read [fd_visit_once]fn config_dir() -> Option<String>~/Library/Application Support (on iOS inside the app's container, whose root is $HOME). The same folder as data_dir, as Rust'sdirscrate has it: config:// and data:// share the app's folder.fn data_dir() -> Option<String>~/Library/Application Supportfn cache_dir() -> Option<String>~/Library/Cachesfn temp_dir() -> Option<String>$TMPDIR (absolute; macOS gives each user one, iOS each app), else /tmpfn cwd() -> Stringthe current directory ("" on failure) [plat_cwd]