Skip to main content

mem_cache_dir

Function mem_cache_dir 

Source
pub fn mem_cache_dir() -> PathBuf
Expand description

Resolve the global mem-cache directory.

Respects MEMSTEAD_MEM_CACHE if set — tests use this to point at a tempdir without touching the real user-data directory. Otherwise returns <data_dir>/memstead/mems on every platform (macOS / Linux / Windows), so the CLI and the Memstead app resolve to the same path without per-platform branching.

dirs::data_dir() is infallible on Tier-1 platforms; expect is fine for an engine that only runs on systems with a resolvable home.