Island: Implement delete_files_by_pattern() in FileRepositoryLockingDecorator

This commit is contained in:
Shreya Malviya 2022-09-28 16:25:13 +05:30
parent d5b62651a0
commit 5f11008b40
1 changed files with 4 additions and 0 deletions

View File

@ -26,6 +26,10 @@ class FileRepositoryLockingDecorator(IFileRepository):
with self._rwlock.gen_wlock(): with self._rwlock.gen_wlock():
return self._file_repository.delete_file(unsafe_file_name) return self._file_repository.delete_file(unsafe_file_name)
def delete_files_by_pattern(self, file_name_pattern: str):
with self._rwlock.gen_wlock():
return self._file_repository.delete_files_by_pattern(file_name_pattern)
def delete_all_files(self): def delete_all_files(self):
with self._rwlock.gen_wlock(): with self._rwlock.gen_wlock():
return self._file_repository.delete_all_files() return self._file_repository.delete_all_files()