Here's my goal:

I have a thread that listens on a channel for tuples of [file-path, 
file-contents] and writes files to a zip file using clojure.java.io/copy.

It's been really nice to be able to specify file-contents as anything 
clojure.java.io/copy can consume, such as a byte[] or a String, and it will 
"just work".  Well, except when I'm trying to add something from my 
resources like: [file-path, (io/file (io/resource "myfile.txt"))] while in 
an uberjar.

I'm able to workaround using the suggestion to use io/input-stream instead 
of io/file, but now I have to deal with closing the stream myself which is 
neatly handled for me when io/copy is given a file.

On Wednesday, January 28, 2015 at 10:36:19 AM UTC-6, Jeroen van Dijk wrote:
>
> I'm not sure anymore what your goal is exactly, but here is what I meant 
> to be complete:
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to