kkrunner.files.FileVersion
- class kkrunner.files.FileVersion(path, fingerprint, digest=None)[source]
Bases:
objectA path together with cheap metadata and authoritative content identity.
fingerprintis a cheap filesystem snapshot used only as a fast path. For regular files captured with the default settings,digestis the SHA-256 identity of the contents. A later metadata change therefore causes content verification rather than by itself making the historical version stale.- Parameters:
path (Path)
fingerprint (FileFingerprint | None)
digest (str | None)
- path: Path
- fingerprint: FileFingerprint | None
- digest: str | None = None
- classmethod capture(path, *, digest=True, require_digest=False)[source]
Capture path, optionally requiring a stable content digest.
A digest is never associated with metadata observed before or after a concurrent rewrite. Strict callers such as persistent-history capture retry once and then fail instead of degrading to metadata-only identity.
- Parameters:
path (str | Path)
digest (bool)
require_digest (bool)
- Return type:
- property available: bool
Whether this snapshot has usable content identity.