pub fn state_dir() -> Result<Option<PathBuf>, HomeDirError>
Returns the path to the state directory, if available.