Raynes / fs

File system utilities for Clojure.
453 stars 119 forks source link

added with-temp-dir macro #110

Open eranb opened 7 years ago

eranb commented 7 years ago

might be useful

(me.raynes.fs/with-temp-dir [source target]
  (let [f (str source "/shuki.txt")
        t (str target "/shuki.txt")]
    (spit f "hello")
    (me.raynes.fs/rename f t)
    (slurp t)))

all temp folders will be deleted after execution

boxxxie commented 6 years ago

This would be very useful when dealing with unzipping/re-zipping files (which is actually what i'm doing with .ods files right now)