Skip to main content

get_state_dir

Function get_state_dir 

Source
pub fn get_state_dir(local: bool) -> Result<PathBuf>
Expand description

Get the state directory path

All paths land under a .hack/ namespace with rs/ reserved for this tool, leaving room for siblings (.hack/ts/, .hack/shared/, …).

Priority order:

  1. Environment variable HACK_STATE_DIR (treated as the .hack/ base; rs is appended)
  2. –local-state flag (uses ./.hack/rs)
  3. Global default (system data directory under com.hack.hack/rs)