Expand description
Database file path resolution.
The storage engine needs to know where to put the SQLite file. This module resolves the path from three sources, in priority order:
- Explicit config:
[store] pathinmcpr.toml— user chose a specific location. - Environment variable:
MCPR_DB— useful for CI, Docker, or per-session overrides. - Default:
~/.mcpr/store.db— all mcpr state lives under~/.mcpr/.
The parent directory is created automatically if it doesn’t exist.
Functions§
- ensure_
parent_ dir - Ensure the parent directory of the given path exists.
- resolve_
db_ path - Resolve the database file path.