Fork me on GitHub
#clojure-europe
<
2023-01-29
>
genRaiy16:01:54

Middlesbrough week starts today. Ray has landed.

❤️ 12
🎉 2
jasonbell23:01:37

Just stumbled on make-parents in the lib. Handy indeed.

(let [daftly-long-filename "/tmp/project/foo/bar/text.txt"]
   (io/make-parents daftly-long-filename)
   (spit daftly-long-filename content))

metal 4
🙏 2
dominicm07:01:18

It works nicely with doto. (spit (doto "/tmp/foo/bar" io/make-parents) content)

metal 4
borkdude09:01:29

Yep, I do that a lot :)

(spit (doto (fs/file "foo" "bar") (-> fs/parent fs/create-dirs)) ...)

jasonbell09:01:56

Thanks. Borrowing that! 🙂