Last active
August 29, 2015 14:16
-
-
Save wkf/48c587b5fefe0ce441cc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(require '[clojure.tools.namespace.find :as find] | |
'[clojure.tools.namespace.file :as file]) | |
(defn find-source-files | |
"Returns all source files declaring the given namespace." | |
([ns] | |
(find-source-files ns ".")) | |
([ns dir] | |
(filter | |
#(= (-> % file/read-file-ns-decl second) ns) | |
(find/find-clojure-sources-in-dir (io/file dir))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment