pyboxbuilder.export.fingerprint.matches

pyboxbuilder.export.fingerprint.matches(path: Path, fingerprint: str) → bool[source]

Return True when path on disk was built from this exact description.

Parameters:
path: Path

The file that would be written.

fingerprint: str

The digest of everything that decides its geometry.

Returns:

True only when the file exists, is not empty, and its recorded fingerprint is the one given (handling both bare and sha256:-prefixed formats). An unrecorded file is a miss, so a tree exported by an older version rewrites once and then settles.