shutil, biraz akıllı olsa... :)

This commit is contained in:
Barış Metin
2005-07-05 20:48:45 +00:00
parent 03f6584dc2
commit 6b172f08a0
+1
View File
@@ -151,6 +151,7 @@ def clean_dir(path):
# for name in dirs: # for name in dirs:
# os.rmdir(os.path.join(root, name)) # os.rmdir(os.path.join(root, name))
# don't reimplement the wheel # don't reimplement the wheel
if os.path.exists(path):
shutil.rmtree(path) shutil.rmtree(path)
def dir_size(dir): def dir_size(dir):