clojure.java.io/resource isn't specific to the resources folder. It just
scans the classpath. Your classpath probably looks like
"test:src:resources" or something so "test" wins. If there was a
test/readme.txt file you'd also get that rather than resources/readme.txt.

Cheers,
Dave

On Thu, Sep 11, 2014 at 5:31 AM, Joc O'Connor <johnocon...@fico.com> wrote:

> Hi, when I use (.getPath (clojure.java.io/resource "readme.txt")) I get
> the file path to the correct file in the resources folder (or nil if it
> doesn't exist).
> However if I pass in an empty string it returns the path to the 'test'
> folder rather then 'resources'. I have tried setting setting the resource
> paths in project.clj with no change in behaviour.
>
> Can anybody work out where I am going wrong?
>
> Joc
>
> --
> 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.
>

-- 
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