aboutsummaryrefslogtreecommitdiff
path: root/db.py
diff options
context:
space:
mode:
Diffstat (limited to 'db.py')
-rw-r--r--db.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/db.py b/db.py
index 3fc7c6f..cb280d8 100644
--- a/db.py
+++ b/db.py
@@ -99,3 +99,12 @@ def bookmarks(path):
for name in files:
bookmarks.append(bookmark(path / Path(name)))
return bookmarks
+
+
+def remove(path):
+ path = Path(path)
+ try:
+ os.remove(path)
+ logging.info("{} removed".format(path.name))
+ except FileNotFoundError:
+ logging.warning("{} doesn't exist!".format(path.name))