plinder.core.utils.files#

Small file helpers shared by release builders and readers.

Reuse immutable files on one filesystem, copying across filesystems.

plinder.core.utils.files.file_sha256(path: Path) → str[source]#

Hash a file without loading it into memory.

plinder.core.utils.files.read_json_cache(path: Path) → dict[str, Any] | None[source]#

Read an optional cache marker; missing or malformed markers are cache misses.

plinder.core.utils.files.write_json_atomic(path: Path, payload: dict[str, Any]) → None[source]#

Replace a JSON file only after writing its complete contents.