Skip to content

Commit

Permalink
Add a save...interop function. Might be a better way
Browse files Browse the repository at this point in the history
  • Loading branch information
ssuehs-shango committed Feb 3, 2013
1 parent a69a4f8 commit d88c87a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions nastimer/src/nastimer/core.clj
Expand Up @@ -30,6 +30,15 @@
(with-open [r (java.io.PushbackReader. (java.io.FileReader. inputfilename))]
(doall (take-while identity (repeatedly (fn [] (read r false nil)))))))

(defn save-nasfiles-interop
"Save a list of nasfiles to a text file."
[nasfiles outputfile]
(binding [*out* (java.io.FileWriter. outputfile)]
(doall
(for [nf nasfiles]
(do (print "#nasfile/file")
(prn { :path (:path nf) :size (:size nf) :moddate (:moddate nf) }) )))))


(defn scan
"Returns a sequence of NasFiles as read from rootToScan."
Expand Down

0 comments on commit d88c87a

Please sign in to comment.