0

Is there a way to read out the whole structure of the resources folder in a leiningen project?

It looks like this one only works, when the project is not yet packed into a jar:

(require '[clojure.java.io :as io])

(-> (io/resource "")
    io/file
    file-seq)

Particularly, in a packed jar (io/resource "") already returns nil instead of a valid Java object.

Anton Harald
  • 5,772
  • 4
  • 27
  • 61
  • 1
    Possible duplicate of [Get a list of resources from classpath directory](http://stackoverflow.com/questions/3923129/get-a-list-of-resources-from-classpath-directory) – Piotrek Bzdyl Aug 01 '16 at 12:13
  • I have suggested the existing question which handles the same problem (using Java API). – Piotrek Bzdyl Aug 01 '16 at 12:14

0 Answers0