synology_apm_repo.sdk.units.content.local_file module

LocalFileContentSource — a ContentSource over one plain store file, outside the dedup layer.

class synology_apm_repo.sdk.units.content.local_file.LocalFileContentSource(store, path, size)

Bases: object

A ContentSource reading a file directly from the store, not through the dedup layer — for the non-dedup descriptor files (.vmx/.vmdk headers/.delta) under copy_meta_file/<dir>/.

Build one with create: a caller-unknown size is resolved via store.size() there, since size must stay a sync property.

async classmethod create(store, path, size)
property size: int | None
async read(offset=0, length=None)
stream(block=8388608)
async export_range(writer, start, end, *, sparse=True, progress=None, tuning=None)

Copies the range block by block: always a full, non-sparse write regardless of sparse.

Raises:
async planned_bytes(start, end)