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