Skip to main content

Module dirs

Module dirs 

Source
Expand description

Harmont-specific directory resolution.

Every directory accessor in this module returns an hm-namespaced path under an XDG-correct root: configuration in ~/.config/hm/, regenerable cache in ~/.cache/hm/. Raw platform primitives (home_dir, config_dir, cache_dir) live in os::dirs and are not re-exported — callers outside hm-util should never need them.

Functions§

find_project_root
Walk up from start looking for a directory containing .hm/. Returns the project root (the directory containing .hm/), or None if the filesystem root is reached without finding one.
hm_cache_dir
~/.cache/hm/ — local build cache root (regenerable).
hm_config_dir
~/.config/hm/ — user config root (config.toml, credentials.toml).
hm_workspace_cache_dir
~/.cache/hm/workspaces/ — COW workspace cache root.