Implement deletion
This commit is contained in:
parent
1b69d6aab4
commit
5d6a1e1f7d
@ -5,6 +5,7 @@
|
||||
"""
|
||||
import json
|
||||
import logging
|
||||
import shutil
|
||||
from os import PathLike
|
||||
from pathlib import Path
|
||||
|
||||
@ -89,7 +90,6 @@ class Hierarchy(PathLike):
|
||||
|
||||
def cleanup(self, **kwargs):
|
||||
"""Clean up this Hierarchy's data from the filesystem."""
|
||||
import shutil
|
||||
|
||||
syslog.info(f"Performing cleanup on {self._path}")
|
||||
|
||||
@ -101,6 +101,8 @@ class Hierarchy(PathLike):
|
||||
)
|
||||
return
|
||||
|
||||
shutil.rmtree(self)
|
||||
|
||||
def read_metadata(self):
|
||||
"""Read this repository's metadata from its file and
|
||||
then return it.
|
||||
|
Loading…
x
Reference in New Issue
Block a user