Skip to main content

state_dir

Function state_dir 

Source
pub fn state_dir(
    state_dir_env: Option<&OsStr>,
    xdg_config_home: Option<&OsStr>,
    home: &Path,
) -> PathBuf
Expand description

Directory that holds the state file.

$SHELLGAME_STATE_DIR wins, then $XDG_CONFIG_HOME/shellgame, then ~/.config/shellgame (also on macOS). Empty values count as unset, as they do in Python, where "" is falsy. The caller reads the environment and passes the values in.