class documentation

A resource directory that reads files from a filesystem directory.

Data is indexed once on initialization; you need to explicitly call reindex() to refresh the file list if you change the contents of the directory outside of the LocalDirectory instance.

Missing/non-existent directories are allowed for reading.

If you initialize with writable=True, the directory will be created if it does not exist.

This class implements a read-write mapping interface but if you intend to modify the directory contents, you must initialize it with writable=True.

Parameters
pathThe filesystem path to the resource directory.
Method __delitem__ Undocumented
Method __getitem__ Undocumented
Method __init__ Undocumented
Method __iter__ Undocumented
Method __len__ Undocumented
Method __repr__ Undocumented
Method __setitem__ Undocumented
Method reindex Undocumented
Instance Variable _files Undocumented
Instance Variable _path Undocumented
Instance Variable _writable Undocumented
def __delitem__(self, key: str): (source)

Undocumented

def __getitem__(self, key: str) -> bytes: (source)

Undocumented

def __init__(self, path: str | Path, writable: bool = False): (source)

Undocumented

def __iter__(self): (source)

Undocumented

def __len__(self) -> int: (source)

Undocumented

def __repr__(self): (source)

Undocumented

def __setitem__(self, key: str, value: bytes): (source)

Undocumented

def reindex(self): (source)

Undocumented

Undocumented

Undocumented

_writable = (source)

Undocumented