synology_apm_repo.sdk.storage.local module¶
LocalFsStore — the ObjectStore implementation for a local (or
locally-mounted) filesystem tree.
- class synology_apm_repo.sdk.storage.local.LocalFsStoreDescriptor(root)¶
Bases:
objectPicklable recipe for rebuilding an equivalent
LocalFsStore.- build()¶
- class synology_apm_repo.sdk.storage.local.LocalFsStore(root)¶
Bases:
objectA local (or locally-mounted) filesystem tree, addressed by
"/"-separated paths relative toroot.read()opens a fresh read-only fd per call and closes it, keeping no per-path state; a caller wanting fd reuse owns that itself.- Raises:
NotFoundError –
rootis not a directory.PermissionDeniedError –
rootcannot be accessed.
- async close()¶
Nothing to release: every call opens and closes its own fd.
- descriptor()¶
How a worker process rebuilds this store.
- local_path(path)¶
The OS path of store-relative
path, for a caller that opens the file itself (storage/sqlite.py’s read-only fast path).- Raises:
NotFoundError –
pathis absolute or escapes the store root.
- async read(path, offset=0, length=None)¶
- async size(path)¶
- async exists(path)¶
- async listdir(path)¶
- read_sync(path, offset=0, length=None)¶
read, blocking the calling thread (storage.base.SyncReadable).