Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
bevyengine
GitHub Repository: bevyengine/bevy
Path: blob/main/crates/bevy_platform/src/dirs/mod.rs
30636 views
1
//! APIs that return the location of standard user directories.
2
3
// Modeled after https://github.com/dirs-dev/dirs-sys-rs/
4
5
#[cfg(not(any(target_os = "windows", target_os = "macos", target_os = "linux")))]
6
use std::path::PathBuf;
7
8
#[cfg(target_os = "windows")]
9
mod windows;
10
#[cfg(target_os = "windows")]
11
pub use windows::preferences_dir;
12
13
#[cfg(target_os = "macos")]
14
mod macos;
15
#[cfg(target_os = "macos")]
16
pub use macos::preferences_dir;
17
18
#[cfg(target_os = "linux")]
19
mod linux;
20
#[cfg(target_os = "linux")]
21
pub use linux::preferences_dir;
22
23
/// Returns the path to the directory used for application settings. This version
24
/// always returns `None`.
25
#[cfg(not(any(target_os = "windows", target_os = "macos", target_os = "linux")))]
26
pub fn preferences_dir() -> Option<PathBuf> {
27
None
28
}
29
30