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: object

Picklable recipe for rebuilding an equivalent LocalFsStore.

root: str
build()
class synology_apm_repo.sdk.storage.local.LocalFsStore(root)

Bases: object

A local (or locally-mounted) filesystem tree, addressed by "/"-separated paths relative to root.

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:
async close()

Nothing to release: every call opens and closes its own fd.

descriptor()

How a worker process rebuilds this store.

property root: Path
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 – path is 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).