After perusing stackoverflow, it's evident to me that the "proper" way to
access a file within a jar is to use getResourceAsStream (as was mentioned
in the thread above, thank you), and I suppose clojure's io/input-stream
does the trick as well. Thanks, all!
--
You received this message bec
It seems my problem is related to this line in io.clj:
https://github.com/clojure/clojure/blob/f437b853adeaffc5cad9bb1e01e2355357a492c9/src/clj/clojure/java/io.clj#L60
(if (= "file" (.getProtocol u))
(as-file (escaped-utf8-urlstring->str
(.replace (.getFile u) \/ File/se
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
java:152)
at clojure.lang.RestFn.applyTo(RestFn.java:132)
at halp.core.main(Unknown Source)
It doesn't look like io/copy works with a URL.
On Tuesday, January 27, 2015 at 2:52:00 PM UTC-6, Marshall
Bockrath-Vandegrift wrote:
>
> On Monday, January 26, 2015 at 9:2
> anymore.
>
> I could turn around using an InputStream (I was in the case I wanted to
> serve a resource via http-kit)
>
> If you want more info, I can point you to the code where I use it
>
> Hope it helps,
> Ben
>
>
>
>
> On Tue, Jan 27, 2015 at 5:04 AM,
I've created a sample project at Github[1] to demonstrate the problem I'm
facing with accessing a resource file when using an uberjar. Could someone
point out what I'm doing wrong here? Thanks!
[1]: https://github.com/RasterBurn/halp
### Given this code: ###
```clojure
(ns ha