MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / digest

Function digest

tools/materialize-bench/imported_guest.py:25–30  ·  view source on GitHub ↗
(path)

Source from the content-addressed store, hash-verified

23
24
25def digest(path):
26 value = hashlib.sha256()
27 with path.open('rb') as stream:
28 for block in iter(lambda: stream.read(1024 * 1024), b''):
29 value.update(block)
30 return value.hexdigest()
31
32
33def validate_manifest(manifest):

Callers 3

immutable_changes_digestFunction · 0.70
prepareFunction · 0.70
measureFunction · 0.70

Calls 3

openMethod · 0.45
readMethod · 0.45
updateMethod · 0.45

Tested by

no test coverage detected