Skip to main content

cache_root

Function cache_root 

Source
pub fn cache_root() -> Result<PathBuf>
Expand description

Resolve the cache path without creating directories.

Follows the XDG Base Directory specification: $XDG_CACHE_HOME/hrx, or $HOME/.cache/hrx when that is unset or empty. The specification requires these variables to hold absolute paths and says a relative one is invalid and must be ignored, so a relative XDG_CACHE_HOME falls back to $HOME rather than resolving against the working directory.