(file_path)
| 37 | |
| 38 | @staticmethod |
| 39 | def get_sha256(file_path): |
| 40 | sha256 = hashlib.sha256() |
| 41 | with open(file_path, 'rb') as f: |
| 42 | while True: |
| 43 | data = f.read(4096) |
| 44 | if not data: |
| 45 | break |
| 46 | sha256.update(data) |
| 47 | return sha256.hexdigest() |
| 48 | |
| 49 | |
| 50 | class FileServer(object): |
no test coverage detected