Function xdg::get_config_home_from_env [-] [+] [src]

pub fn get_config_home_from_env<'a, F>(get_env_var: &'a F) -> Result<PathBuf> where F: Fn(&'a str) -> Option<OsString>

Get the config home directory given a closure that returns the the value of an environment variable. This method allows having a custom environment.

If $XDG_CONFIG_HOME is not set, it returns $HOME/.config.