Function xdg_basedir::dirs::get_data_home_from_env
[−]
[src]
pub fn get_data_home_from_env<'a, F>(get_env_var: &'a F) -> Result<PathBuf> where F: Fn(&'a str) -> Option<OsString>
Get the data home directory given a closure that returns the the value of an environment variable. This method allows having a custom environment.
If $XDG_DATA_HOME
is not set, it returns $HOME/.local/share
.