For better hexvalue print out
parent
906aae5ba5
commit
d1f0d47fdf
|
@ -4,6 +4,7 @@ import argparse
|
|||
from typing import List
|
||||
import pandas as pd
|
||||
import hashlib
|
||||
from datetime import datetime
|
||||
import csv
|
||||
|
||||
from pandas.core.series import Series
|
||||
|
@ -33,7 +34,9 @@ def get_file_checksum(p: pathlib.Path):
|
|||
with open(p, 'rb') as f:
|
||||
while chunk := f.read(8192):
|
||||
m.update(chunk)
|
||||
return m.hexdigest()
|
||||
hexvalue = m.hexdigest()
|
||||
print(hexvalue)
|
||||
return hexvalue
|
||||
|
||||
if __name__ == "__main__":
|
||||
parser = argparse.ArgumentParser(description='convert hardlink to symlink in download folder')
|
||||
|
@ -81,8 +84,8 @@ if __name__ == "__main__":
|
|||
csv_path = "result.csv"
|
||||
df_csv = pd.DataFrame(columns=['FileName', 'Path', 'inode', 'NumberOfLinks', 'CheckSum'])
|
||||
for x in paths:
|
||||
print(str(x))
|
||||
if x.lstat().st_size > min_file_size * 1024 * 1024:
|
||||
print(str(datetime.now()) + " : " + str(x))
|
||||
new_row = {'FileName': x.name,
|
||||
'Path': str(x),
|
||||
'inode': x.lstat().st_ino,
|
||||
|
|
Loading…
Reference in New Issue