Expand description
Cross-platform resolution for the persistent-database default path.
The persistent database lives in the platform-standard data directory:
- macOS:
~/Library/Application Support/hyperdb/workspace.hyper - Linux:
$XDG_DATA_HOME/hyperdb/workspace.hyper(defaults to~/.local/share/hyperdb/workspace.hyper) - Windows:
%APPDATA%\hyperdb\workspace.hyper
Note this is intentionally distinct from ~/.hyperdb/, which is the
daemon’s state directory (daemon.json, logs/). Daemon coordination
and user data have different lifecycles, so they live in different
places.
Resolution precedence:
- Explicit CLI value (
--persistent-db <PATH>or the deprecated--workspace <PATH>). HYPERDB_PERSISTENT_DBenvironment variable.- Platform default via
dirs::data_dir.
Constants§
- ENV_
PERSISTENT_ DB - Environment variable that overrides the platform-default path.
Functions§
- default_
persistent_ db_ path - Returns the platform-default path for the persistent database. Returns
Noneif the home / data directory cannot be determined (rare; usually indicates a misconfigured environment). - resolve_
persistent_ db_ path - Resolve where the persistent database should live, applying the
CLI > env-var > platform-default precedence. Returns
Noneonly when no source supplied a path (the platform default failed and nothing was set explicitly), which the caller should treat as an error.