folder: rename put-new to create; simplifications
This commit is contained in:
parent
d759a5c57c
commit
997b0afb0e
2 changed files with 7 additions and 10 deletions
|
@ -5,7 +5,7 @@
|
|||
(:local-nicknames (:shape :scopes/shape)
|
||||
(:tracking :scopes/storage/tracking)
|
||||
(:util :scopes/util))
|
||||
(:export #:folder #:root #:put-new
|
||||
(:export #:folder #:root #:create
|
||||
#:make-container))
|
||||
|
||||
(in-package :scopes/storage/folder)
|
||||
|
@ -26,12 +26,9 @@
|
|||
:storage storage))
|
||||
|
||||
(defun root (cont)
|
||||
(let ((f (tracking:make-item cont nil :root)))
|
||||
(tracking:save f)))
|
||||
(tracking:save (tracking:make-item cont nil :root)))
|
||||
|
||||
(defun put-new (name parent)
|
||||
(let* ((cont (tracking:container parent))
|
||||
(pid (write-to-string (tracking:trackid parent)))
|
||||
(f (tracking:make-item cont pid name)))
|
||||
(util:lgi pid f)
|
||||
(tracking:save f)))
|
||||
(defun create (name parent)
|
||||
(let ((cont (tracking:container parent))
|
||||
(pid (write-to-string (tracking:trackid parent))))
|
||||
(tracking:save (tracking:make-item cont pid name))))
|
||||
|
|
|
@ -91,5 +91,5 @@
|
|||
(setf root (folder:root cont))
|
||||
(== (tracking:trackid root) 1)
|
||||
(== (shape:head-value root :parentid) nil)
|
||||
(setf f1 (folder:put-new :child1 root))
|
||||
(setf f1 (folder:create :child1 root))
|
||||
))
|
||||
|
|
Loading…
Add table
Reference in a new issue