feat: add administrative commands to free up storage space by removing unused files (#18835)
This commit is contained in:
parent
b62eb61400
commit
993ef87dca
5 changed files with 286 additions and 0 deletions
|
|
@ -30,3 +30,11 @@ class BaseStorage(ABC):
|
|||
@abstractmethod
|
||||
def delete(self, filename):
|
||||
raise NotImplementedError
|
||||
|
||||
def scan(self, path, files=True, directories=False) -> list[str]:
|
||||
"""
|
||||
Scan files and directories in the given path.
|
||||
This method is implemented only in some storage backends.
|
||||
If a storage backend doesn't support scanning, it will raise NotImplementedError.
|
||||
"""
|
||||
raise NotImplementedError("This storage backend doesn't support scanning")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue