feat: add administrative commands to free up storage space by removing unused files (#18835)
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user