MCPcopy Index your code
hub / github.com/Tencent/CodeAnalysis / get_md5

Method get_md5

client/util/api/fileserver.py:28–36  ·  view source on GitHub ↗
(file_path)

Source from the content-addressed store, hash-verified

26class FlieHash(object):
27 @staticmethod
28 def get_md5(file_path):
29 md5 = hashlib.md5()
30 with open(file_path, 'rb') as f:
31 while True:
32 data = f.read(4096)
33 if not data:
34 break
35 md5.update(data)
36 return md5.hexdigest()
37
38 @staticmethod
39 def get_sha256(file_path):

Callers 1

upload_fileMethod · 0.80

Calls 2

readMethod · 0.45
updateMethod · 0.45

Tested by

no test coverage detected