Created
March 1, 2012 15:01
-
-
Save kasz/1950304 to your computer and use it in GitHub Desktop.
Typed and standard Clojure functions
This file contains hidden or 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
(defn- list-directory-json-files | |
"Lists JSON files in specified directory." | |
[path] | |
(let [directory (io/file path) | |
files (file-seq directory)] | |
(filter #(.endsWith %1 ".json") (map #(.getPath %1) files)))) |
This file contains hidden or 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
(defn- list-directory-json-files | |
"Lists JSON files in specified directory." | |
[^String path] | |
(let [directory (io/file path) | |
files (file-seq directory)] | |
(filter #(.endsWith ^String %1 ".json") (map #(.getPath ^java.io.File %1) files)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment