Commit 5437fd25 authored by Marco Antoniotti's avatar Marco Antoniotti

Added a few convenience functions.

parent 525870e9
......@@ -10,7 +10,10 @@
......@@ -56,6 +56,19 @@
(and (probe-file a-or-l-dd-pathname) t))))
(defun app-or-library-data-folders ()
"Returns a list of the folder pathnames present in the CL data folder."
(directory (user-common-lisp-data-directory)))
(defun known-apps-or-libraries-data ()
"Returns a list of known apps or libraries listed in the CL data folder."
(mapcar #'(lambda (aldf)
(declare (type pathname aldf))
(first (last (pathname-directory aldf))))
(defun ensure-app-or-library-data-folder (app-or-library-name
......@@ -76,6 +89,17 @@
(defun reset-app-or-data-folder (app-or-library-name &optional abort-if-non-empty)
(declare (type string app-or-library-name)
(type boolean abort-if-non-empty)
(when (string/= "" app-or-library-name)
(let ((app-lib-data-folder (app-or-library-data-folder app-or-library-name)))
(dolist (f (directory app-lib-data-folder) t)
(delete-file f)
;;;; These will go in the 'impl-dependent' folder.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment