MCPcopy Create free account
hub / github.com/conda/constructor / hash_files

Function hash_files

constructor/utils.py:79–88  ·  view source on GitHub ↗
(paths, algorithm="md5")

Source from the content-addressed store, hash-verified

77
78
79def hash_files(paths, algorithm="md5"):
80 h = hashlib.new(algorithm)
81 for path in paths:
82 with open(path, "rb") as fi:
83 while True:
84 chunk = fi.read(262144)
85 if not chunk:
86 break
87 h.update(chunk)
88 return h.hexdigest()
89
90
91def make_VIProductVersion(version):

Callers 2

write_repodataFunction · 0.90
get_headerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected