Skip to content

Commit 1da1325

Browse files
committed
Add remove method to StorageBackendInterface
Define a remove method for removing/deleting items from the storage backend. The tuf reference implementation needs to be able to delete metadata files which have been marked as removed. Signed-off-by: Joshua Lock <[email protected]>
1 parent 01a0c95 commit 1da1325

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

securesystemslib/storage.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,25 @@ def put(self, fileobj, filepath):
9393
raise NotImplementedError # pragma: no cover
9494

9595

96+
@abc.abstractmethod
97+
def remove(self, filepath):
98+
"""
99+
<Purpose>
100+
Remove the file at 'filepath' from the storage.
101+
102+
<Arguments>
103+
filepath:
104+
The full path to the file.
105+
106+
<Exceptions>
107+
securesystemslib.exceptions.StorageError, if the file can not be removed.
108+
109+
<Returns>
110+
None
111+
"""
112+
raise NotImplementedError # pragma: no cover
113+
114+
96115
@abc.abstractmethod
97116
def getsize(self, filepath):
98117
"""

0 commit comments

Comments
 (0)