Created
March 18, 2010 17:26
-
-
Save remleduff/336602 to your computer and use it in GitHub Desktop.
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 files-in-dir | |
([dir] | |
(let [dirFile (File. dir)] | |
(.list dirFile))) | |
([dir suffix] | |
(let [dirFile (File. dir) | |
fileFilter (proxy [FilenameFilter] [] | |
(accept [dir name] (.endsWith name suffix)))] | |
(.list dirFile fileFilter)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment