def copy_to_purge_dir(self, abspath):
"""
?abspath???????????purge???,???????
config.IGNORE_FILES????
"""
ignore = shutil.ignore_patterns(*config.IGNORE_FILES)
if os.path.isdir(abspath):
shutil.copytree(abspath, self.path_helper.purge_path, ignore=ignore)
else:
ignores = ignore(None, abspath)
if not ignores:
shutil.copy(abspath, self.path_helper.purge_path)
评论列表
文章目录