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.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, reads, and closes it — no per-path state of its own, the same shape SmbStore already has. Any caller whose own access pattern genuinely benefits from reusing an open fd across several reads to the same path owns that reuse decision itself, rather than this store deciding on its own, opaquely, whether or how long to keep something cached.

On the async interface: this store’s four methods are asyncio.to_thread() wrappers around a synchronous body — local I/O has no native async form in CPython to wrap instead.

property root: Path
async read(path, offset=0, length=None)
async size(path)
async exists(path)
async listdir(path)