@ -29,7 +29,8 @@
#:copy-storage-directory
#:copy-storage-directory
#:copy-raw-directory
#:copy-raw-directory
#:get-files-in-raw-directory
#:get-files-in-raw-directory
#:get-raw-subdirectories ) )
#:get-raw-subdirectories
#:raw-directory-exists? ) )
( in-package #:storage )
( in-package #:storage )
( defun init-storage ( )
( defun init-storage ( )
@ -116,13 +117,15 @@ calling this function."
"Returns a list of paths for the files in `DIRECTORY-PATH' outside /storage directory."
"Returns a list of paths for the files in `DIRECTORY-PATH' outside /storage directory."
( cl-fad:list-directory ( make-raw-path directory-path ) ) )
( cl-fad:list-directory ( make-raw-path directory-path ) ) )
( defun raw-directory-exists? ( directory-path )
"Checks to see if directory at `DIRECTORY-PATH' (no directory make if none found)."
( cl-fad:directory-exists-p ( make-raw-path directory-path ) ) )
( defun get-directory-names ( directory-names )
( defun get-directory-names ( directory-names )
" Returns the final part of a directories absolute path in ` DIRECTORY-NAMES '.
" Returns the final part of a directories absolute path in ` DIRECTORY-NAMES '.
Make sure you use ` GET-RAW-DIRECTORIES ' to build the ` DIRECTORY-NAMES ' list. "
Make sure you use ` GET-RAW-DIRECTORIES ' to build the ` DIRECTORY-NAMES ' list. "
( mapcar #' ( lambda ( x ) ( first ( last ( pathname-directory x ) ) ) ) directory-names ) )
( mapcar #' ( lambda ( x ) ( first ( last ( pathname-directory x ) ) ) ) directory-names ) )
;; (first (last (pathname-directory (cl-fad:pathname-directory-pathname (first (cl-fad:list-directory (storage:make-raw-path "snapshots/")))))))
( defun make-path ( username subdirectory slug )
( defun make-path ( username subdirectory slug )
" Forms the path used to save a file.
" Forms the path used to save a file.
Storage path:
Storage path: