Skip to main content

config_dir

Function config_dir 

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

Returns the path to the user’s config directory.

The returned value depends on the operating system and is either a Some, containing a value from the following table, or a None.

PlatformValueExample
Linux$XDG_CONFIG_HOME or $HOME/.config/home/alice/.config
macOS$HOME/Library/Application Support/Users/Alice/Library/Application Support
Windows%APPDATA%\RoamingC:\Users\Alice\AppData\Roaming

NOTE: if the feature favor-xdg-style is enabled, $HOME/.config is favorized.