摘要:
import os,shutiltotal = 0def HandleDir(root, dir): passdef DoFilter(file): focus = [".lua"] ext = os.path.splitext(file)[-1] if ext in focus: return True return Falsedef HandleFile(root, file): global total if not DoFilter(file): return full_path = os.path.join(... 阅读全文
摘要:
代码如下:import os,shutildef RemoveDir(dir): shutil.rmtree(dir, True)def HandleDir(root, dir): if dir == ".svn": print os.path.join(root, dir) RemoveDir(os.path.join(root, dir))def HandleFile(root, file): passdef WalkThroughPath(dst_path): try: for root, dirs, files in o... 阅读全文