From cadf0d61d00c89f5c60154f21cd9bbf8078aa965 Mon Sep 17 00:00:00 2001 From: Shreya Malviya Date: Wed, 28 Sep 2022 16:26:37 +0530 Subject: [PATCH] Island: Implement delete_files_by_pattern() in FileRepositoryCachingDecorator --- .../cc/repository/file_repository_caching_decorator.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/monkey/monkey_island/cc/repository/file_repository_caching_decorator.py b/monkey/monkey_island/cc/repository/file_repository_caching_decorator.py index 0e026d035..07bee5258 100644 --- a/monkey/monkey_island/cc/repository/file_repository_caching_decorator.py +++ b/monkey/monkey_island/cc/repository/file_repository_caching_decorator.py @@ -36,6 +36,10 @@ class FileRepositoryCachingDecorator(IFileRepository): self._open_file.cache_clear() return self._file_repository.delete_file(unsafe_file_name) + def delete_files_by_pattern(self, file_name_pattern: str): + self._open_file.cache_clear() + return self._file_repository.delete_files_by_pattern(file_name_pattern) + def delete_all_files(self): self._open_file.cache_clear() return self._file_repository.delete_all_files()