resolve_config_pathΒΆ
Defined in dccd.daemon.config
- resolve_config_path(path=None)[source]
Return the config file path to use, applying XDG fallback when path is None.
- Parameters:
- pathstr, pathlib.Path, or None
Explicit config path. When
None, the function searches in order:./config.yml(current working directory), thenDEFAULT_CONFIG_PATH($XDG_CONFIG_HOME/dccd/config.yml).
- Returns:
- pathlib.Path
Resolved path. When path is not
Nonethe value is returned as-is (afterexpanduser); existence is not checked.
- Raises:
- FileNotFoundError
When path is
Noneand none of the candidate paths exist.