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), then DEFAULT_CONFIG_PATH ($XDG_CONFIG_HOME/dccd/config.yml).

Returns:
pathlib.Path

Resolved path. When path is not None the value is returned as-is (after expanduser); existence is not checked.

Raises:
FileNotFoundError

When path is None and none of the candidate paths exist.