From 0c652be9fc3e92d827987c7ba0c33fcddcde0573 Mon Sep 17 00:00:00 2001 From: Craig Oates Date: Mon, 24 Oct 2022 00:24:39 +0100 Subject: [PATCH] implement delete-snapshot function in snapshot package. --- src/snapshot.lisp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/snapshot.lisp b/src/snapshot.lisp index fb71fc3..b2d8f82 100644 --- a/src/snapshot.lisp +++ b/src/snapshot.lisp @@ -6,7 +6,8 @@ #:nera) (:export #:take-snapshot - #:restore-from-snapshot)) + #:restore-from-snapshot + #:delete-snapshot)) (in-package #:snapshot) (defun take-snapshot () @@ -31,3 +32,6 @@ user can repopulate that database after they have restored this website. The (format t "RESTORE-FROM-SNAPSHOT NOT IMPLEMENTED.")) +(defun delete-snapshot (snapshot-name) + "Deletes the snapshot in the /snapshots directory with `SNAPSHOT-NAME'." + (storage:remove-raw-directory (format nil "snapshots/~a/" snapshot-name)))