Skip to content

Instantly share code, notes, and snippets.

@alandipert
Forked from remleduff/gist:336602
Created March 18, 2010 17:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alandipert/336610 to your computer and use it in GitHub Desktop.
Save alandipert/336610 to your computer and use it in GitHub Desktop.
(defn files-in-dir
([& dirs]
(map files-in-dir dirs))
([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