Function xdirs::config_dir_for[][src]

pub fn config_dir_for(app: &str) -> Option<PathBuf>

Returns the path to the user’s config directory for a specific application.

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/{app}/home/alice/.config/MyApp
macOS$HOME/Library/Application Support/{app}/Users/Alice/Library/Application Support/MyApp
Windows{FOLDERID_RoamingAppData}/{app}C:\Users\Alice\AppData\Roaming\MyApp

See also config_dir`.