synology_apm_repo.sdk.units.fs module

FsProvider: FS workloads. The whole version is one shared virtual image, <snapshotUuid>/<versionId>/dedup.img, and every file is a [content_dedup_id, content_dedup_id + file_size) byte range within it (FORMAT-SPEC.md: Workload-specific addressing, FS). entry_table.dirname is a full absolute path, so children() is one indexed equality query per level.

dedup.img is located through the version’s target.db: its version_table.version_id combined with Version.target_id (the snapshotUuid) is the path looked up in db/file_map.

class synology_apm_repo.sdk.units.fs.FsProvider(repo, version)

Bases: AsyncClosing

ClosableUnitProvider for one FS workload version.

async dedup_img()

The version’s shared dedup.img composition, opened once and cached — the content every file node’s (offset, size) indexes.

Raises:
  • NotFoundError – The version’s meta directory, target.db’s version_table row, or dedup.img itself is missing.

  • ResourceLimitExceededError – target.db’s temporary copy doesn’t fit with the free-space reserve left.

async close()

Close the entry-table connection, if opened.

root()

The / directory node. No I/O.

async children(node, offset=0, limit=None)
async unit(node)