How to get a list of files matching a wildcard in Clojure?

Is there an easy way to get a list of files matching a given file mask? By file mask, I mean the classic wildcard, not the regular expression.

I can use a seq file and then a filter with a regex generated from a wildcard. However, this is not trivial (think of escapes, etc.)

I also know about FilenameUtils.wildcardMatch () from Apache Commons, but I don’t want to add such a dependency for the tiny tool that I create.

There must be something in the Clojure ecosystem that I don't know about.

+5
source share
2 answers

clj-glob : http://github.com/jkk/clj-glob

(, Windows), .

P.S., .

+5
+5

All Articles