nicetoolbox.utils.filehandling.resolve_single_file¶
- nicetoolbox.utils.filehandling.resolve_single_file(path: Path, *, label: str) Path[source]¶
Resolve path to exactly one existing file.
If path contains a *, expand it as a glob; expect exactly one match.
Otherwise, expect the file to exist as-is.
Zero matches or multiple matches raise ValueError. label is included in error messages to identify the track/source that produced the path.