find_inventory

function of dascore.core.inventory_loader source

find_inventory(
    directory: str | os.PathLike[str, PathLike] ,
)-> ‘Path | None’

Return the path of the inventory a directory carries, or None.

Only the name is judged, never the contents: a path comes back because something sits under the blessed name in a form that name takes, not because it loads. Raises instead of answering when the directory says two things at once – both forms present – or when what sits there is the wrong kind of thing for the name it has, which is a misspelling of the convention rather than a file which owes it nothing.

Parameters

Parameter Description
directory The directory to look in.