From d9b55a5c214c30a5d4d846bf06cc394e6ae2e590 Mon Sep 17 00:00:00 2001 From: Shreya Malviya Date: Wed, 28 Sep 2022 15:35:58 +0530 Subject: [PATCH] Island: Add delete_files_by_pattern() to IFileRepository --- .../monkey_island/cc/repository/i_file_repository.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/monkey/monkey_island/cc/repository/i_file_repository.py b/monkey/monkey_island/cc/repository/i_file_repository.py index bedc9cfdb..5d44a8b4a 100644 --- a/monkey/monkey_island/cc/repository/i_file_repository.py +++ b/monkey/monkey_island/cc/repository/i_file_repository.py @@ -49,6 +49,17 @@ class IFileRepository(metaclass=abc.ABCMeta): """ pass + @abc.abstractmethod + def delete_files_by_pattern(self, file_name_pattern: str): + """ + Delete files whose names match a particular pattern + + This method matches relevant files and deletes them using `delete_file()`. + + :param file_name_pattern: A file name pattern that should be matched to delete files + """ + pass + @abc.abstractmethod def delete_all_files(self): """