Skip to content

Instantly share code, notes, and snippets.

@remleduff
Created March 18, 2010 17:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save remleduff/336602 to your computer and use it in GitHub Desktop.
Save remleduff/336602 to your computer and use it in GitHub Desktop.
(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