I have a folder structure like this:
- resources
- a
- b
- x.txt
- c
- x.txt
- b
- a
I've created my runnable jar with lein uberjar.
When running my jar, I want to list the subfolders of a.
I know I can get the contents of resources/a/b/x.txt using clojure.java.io
(slurp (clojure.java.io/resource "a/b/x.txt"))
But I can't find a simple way to list the subfolders.
(clojure.java.io/file (clojure.java.io/resource "a")) just results in a java.lang.IllegalArgumentException: Not a file because it isn't a file, it's a resource inside the jar file.
Is there a library that does this?