torchcell.data.write_verified
- write_verified(data: bytes, dest: str | Path, expected: str, source: str) None[source]
Write
datatodestonly if it hashes toexpected.The digest is checked before anything is written; the bytes go to a sibling
.partialfile that is renamed into place, sodestnever holds a partial or unverified payload.sourcenames the origin (a URL) in the error.