bir toplevel dizin için tüm dosya ve hash bilgisini oluşturan generator (get_file_hashes)

This commit is contained in:
Barış Metin
2005-06-20 13:33:28 +00:00
parent a09109f02f
commit cec4c2c281
+6
View File
@@ -63,6 +63,12 @@ def copy_file(src,dest):
# fd.write(l)
shutil.copyfile(src, dest)
def get_file_hashes(top):
for root, dirs, files in os.walk(top, topdown=False):
for file in files:
f = os.path.join(root, file)
yield (f, md5_file(f))
def copy_dir(src, dest):
"""copy source dir to destination dir recursively"""
raise UtilError("not implemented")