resolve_against_root

function of dascore.io.index.catalog source

resolve_against_root(
    path: str | pathlib._local.Path[str, Path] ,
    root: pathlib._local.Path | None[Path, None] ,
)-> ‘str | Path’

Resolve a stored source path against a catalog root.

Relative paths resolve against the root; URIs and absolute paths pass through untouched. This is the one rule for turning a stored spelling into one a reader can open. os.path.isabs rather than Path.is_absolute: it answers the same question per platform without building a path object for every row of an index.