forked from p34709852/monkey
Island: Add comment/documentation about delete_file()'s idempotence
This commit is contained in:
parent
1e9627470c
commit
3bf0695a66
|
@ -54,6 +54,7 @@ class DirectoryFileStorageService(IFileStorageService):
|
|||
logger.debug(f"Deleting {safe_file_path}")
|
||||
safe_file_path.unlink()
|
||||
except FileNotFoundError:
|
||||
# This method is idempotent.
|
||||
pass
|
||||
|
||||
def _get_safe_file_path(self, unsafe_file_name: str):
|
||||
|
|
|
@ -38,6 +38,9 @@ class IFileStorageService(metaclass=abc.ABCMeta):
|
|||
"""
|
||||
Delete a file
|
||||
|
||||
This method will delete the file specified by `unsafe_file_name`. This operation is
|
||||
idempotent and will succeed if the file to be deleted does not exist.
|
||||
|
||||
:param unsafe_file_name: An unsanitized file name that identifies the file to be deleted
|
||||
"""
|
||||
pass
|
||||
|
|
Loading…
Reference in New Issue