Given a regex and a directory path, how do I get a seq of files whose path matches the regex?
i.e., I want
(require '[clojure.java.io :as io])
(regex-file-seq #"\.ssh/.*\.pub$" (io/file "/home")) =>
(#<File /home/x/.ssh/iaf_dsa.pub> #<File ....>)
This took me a few minutes to put the pieces together, so I thought I’d post it.
1 Answer