boot-clj/boot

Consider Reader Support For File Objects

Open

#250 geöffnet am 13. Juli 2015

Auf GitHub ansehen
 (1 Kommentar) (0 Reaktionen) (0 zugewiesene Personen)Clojure (178 Forks)batch import
Enhancementhelp wanted

Repository-Metriken

Stars
 (1.748 Stars)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

were it not for the File object on :dir in the TmpFile record, tmpfiles could be passed directly into pods.

#boot.tmpdir.TmpFile{:dir #object[java.io.File 0x5577160d[/Users/me/.boot/cache/tmp/Users/me/Development/apps/myapp/joo/7o2s6s], :path "js/myscript.js", :id "fe1bd08f4351c143197a11cf777ef047", :time 1436124119000}

storing the directory as a string instead makes this possible:

(defn marshall-tmpfile [tmpfile] (update tmpfile :dir #(.getPath %)))

#boot.tmpdir.TmpFile{:dir "/Users/me/.boot/cache/tmp/Users/me/Development/apps/myapp/joo/7o2s6s", :path "js/myscript.js", :id "fe1bd08f4351c143197a11cf777ef047", :time 1436124119000}

it would be an improvement, for my case, to store the TmpFile :dir as a string instead of a File, or perhaps more generally, add reader support for File types to the pod machinery.

Contributor Guide