Changeset View
Changeset View
Standalone View
Standalone View
swh/provenance/archive.py
Show All 9 Lines | |||||
from swh.model.model import Sha1Git | from swh.model.model import Sha1Git | ||||
from swh.storage.interface import StorageInterface | from swh.storage.interface import StorageInterface | ||||
@runtime_checkable | @runtime_checkable | ||||
class ArchiveInterface(Protocol): | class ArchiveInterface(Protocol): | ||||
storage: StorageInterface | storage: StorageInterface | ||||
def directory_ls(self, id: Sha1Git) -> Iterable[Dict[str, Any]]: | def directory_ls(self, id: Sha1Git, minsize: int = 0) -> Iterable[Dict[str, Any]]: | ||||
"""List entries for one directory. | """List entries for one directory. | ||||
Args: | Args: | ||||
id: sha1 id of the directory to list entries from. | id: sha1 id of the directory to list entries from. | ||||
Yields: | Yields: | ||||
dictionary of entries in such directory containing only the keys "name", | dictionary of entries in such directory containing only the keys "name", | ||||
"target" and "type". | "target" and "type". | ||||
Show All 28 Lines |