notes app
This commit is contained in:
parent
3fd6dbd1f5
commit
90fe853f15
1 changed files with 1 additions and 1 deletions
|
|
@ -11,11 +11,11 @@
|
|||
(.encodeToString (.getBytes (str user ":" password)))))
|
||||
|
||||
(def notes-file (io/file (System/getProperty "user.home") ".notes" "notes.txt"))
|
||||
(io/make-parents notes-file)
|
||||
(def file-lock (Object.))
|
||||
|
||||
(defn write-note! [note]
|
||||
(locking file-lock
|
||||
(io/make-parents notes-file)
|
||||
(spit notes-file (str note "\n") :append true)))
|
||||
|
||||
;; hiccup-like
|
||||
|
|
|
|||
Loading…
Reference in a new issue