Skip to main content

config_base_dir

Function config_base_dir 

Source
pub fn config_base_dir() -> Option<PathBuf>
Expand description

Resolves the per-user base directory for an app’s config and data files.

Returns $XDG_CONFIG_HOME when set, else the platform-idiomatic default: $HOME/Library/Application Support on macOS, %APPDATA% on Windows, or $HOME/.config elsewhere. Only absolute paths are accepted; a relative value is rejected so files never land relative to the current working directory.