files.clj 289 B

123456789101112
  1. (ns fira-code.files
  2. (:refer-clojure :exclude [find])
  3. (:require
  4. [clojure.java.io :as io]
  5. [clojure.string :as str]))
  6. (defn find [path re]
  7. (->> (file-seq (io/file path))
  8. (next) ;; skip directory itself
  9. (filter #(re-matches re (.getPath %)))
  10. (sort-by #(.getPath %))))