Fix naming
This commit is contained in:
parent
8077b7fa55
commit
241f345561
1 changed files with 7 additions and 6 deletions
|
@ -1,7 +1,7 @@
|
||||||
(in-package :ml-survey/handlers)
|
(in-package :ml-survey/handlers)
|
||||||
|
|
||||||
(defvar *survey-data-dir*
|
(defun surveys-data-dir ()
|
||||||
(ensure-directories-exist (uiop:merge-pathnames* "data/survey")))
|
(ensure-directories-exist (uiop:merge-pathnames* "data/surveys")))
|
||||||
|
|
||||||
(defun split-uri (uri)
|
(defun split-uri (uri)
|
||||||
(check-type uri string)
|
(check-type uri string)
|
||||||
|
@ -20,7 +20,7 @@
|
||||||
(local-time:now)
|
(local-time:now)
|
||||||
:format '((:hour 2) ":" (:min 2) ":" (:sec 2))))
|
:format '((:hour 2) ":" (:min 2) ":" (:sec 2))))
|
||||||
|
|
||||||
(defun ensure-file-exists (pathname)
|
(defun ensure-file-exist (pathname)
|
||||||
"Ensure that a file specified by PATHNAME exists, create it if it doesn't."
|
"Ensure that a file specified by PATHNAME exists, create it if it doesn't."
|
||||||
(unless (uiop:file-exists-p pathname)
|
(unless (uiop:file-exists-p pathname)
|
||||||
(with-open-file (stream pathname
|
(with-open-file (stream pathname
|
||||||
|
@ -30,10 +30,11 @@
|
||||||
(format stream "")))
|
(format stream "")))
|
||||||
pathname)
|
pathname)
|
||||||
|
|
||||||
(defun make-db-file (file-str)
|
(defun make-db-file (file)
|
||||||
"Prepare and ensure a database file at FILE-STR path."
|
"Prepare and ensure a database file at FILE-STR path."
|
||||||
(let ((path (uiop:merge-pathnames* file-str)))
|
(check-type file string)
|
||||||
(ensure-file-exits (truename path))))
|
(let ((path (uiop:merge-pathnames* file)))
|
||||||
|
(ensure-file-exist (truename path))))
|
||||||
|
|
||||||
(defun make-surveys-db-file ()
|
(defun make-surveys-db-file ()
|
||||||
(make-db-file "surveys-db.lisp"))
|
(make-db-file "surveys-db.lisp"))
|
||||||
|
|
Loading…
Add table
Reference in a new issue