class documentation

class FilesystemMetadataStore(MetadataStore): (source)

View In Hierarchy

Undocumented

Method __init__ Undocumented
Method commit If the backing store requires a commit, do it.
Method getmtime Read the mtime of a metadata entry..
Method list_all Undocumented
Method read Read the contents of a metadata entry.
Method remove Delete a metadata entry
Method write Write a metadata entry.
Instance Variable cache_dir_prefix Undocumented
def __init__(self, cache_dir_prefix: str): (source)

Undocumented

def commit(self): (source)

If the backing store requires a commit, do it. But N.B. that this is not *guaranteed* to do anything, and there is no guarantee that changes are not made until it is called.

def getmtime(self, name: str) -> float: (source)

Read the mtime of a metadata entry.. Raises FileNotFound if the entry does not exist.

def list_all(self) -> Iterable[str]: (source)

Undocumented

def read(self, name: str) -> str: (source)

Read the contents of a metadata entry. Raises FileNotFound if the entry does not exist.

def remove(self, name: str): (source)

Delete a metadata entry

def write(self, name: str, data: str, mtime: float|None = None) -> bool: (source)

Write a metadata entry. If mtime is specified, set it as the mtime of the entry. Otherwise, the current time is used. Returns True if the entry is successfully written, False otherwise.

cache_dir_prefix = (source)

Undocumented