def remove(self, *args, recursive=False, cwd=os.curdir):
removed = 0
for pattern in args:
files = self._glob(pattern, recursive, cwd)
files = self._process_str_paths(files)
if not files:
# TODO: Proper handling of this?
print('Exclude pattern did not match:', pattern)
else:
for file in files:
if file in self._data:
self._data.remove(file)
removed += 1
return removed
评论列表
文章目录