How can I create a list out of all of the files in a specific directory in Clojure? Do I have to resort to calling Java or can Clojure handle this natively?
Usually, when we say that we want to list directory, we mean that we want to get file names or paths, so ->
Simplest way to list directory:
(seq (.list (clojure.java.io/file ".")))
If you want to list it recursive, then:
(map #(.getPath %) (file-seq (clojure.java.io/file ".")))