gix_path::env

Function xdg_config

source
pub fn xdg_config(
    file: &str,
    env_var: &mut dyn FnMut(&str) -> Option<OsString>,
) -> Option<PathBuf>
Expand description

Returns the fully qualified path in the xdg-home directory (or equivalent in the home dir) to file, accessing env_var(<name>) to learn where these bases are.

Note that the HOME directory should ultimately come from home_dir() as it handles windows correctly. The same can be achieved by using var() as env_var.