Skip to content

Instantly share code, notes, and snippets.

@ageldama
Created January 12, 2013 06:55
Show Gist options
  • Select an option

  • Save ageldama/4516489 to your computer and use it in GitHub Desktop.

Select an option

Save ageldama/4516489 to your computer and use it in GitHub Desktop.
(defn print-all [arr]
(println "-----")
(doseq [i arr] (println i)))
;;; 기본적으로 동작할때.
;;; http://docs.oracle.com/javase/6/docs/api/java/io/File.html#listFiles()
(print-all (.listFiles (java.io.File. ".")))
;;;--> dir-file-filter은 그냥 FileFilter을 구현한 객체 인스턴스.
(def dir-file-filter
(reify java.io.FileFilter (accept [this f] (.isDirectory f))))
;;; http://docs.oracle.com/javase/6/docs/api/java/io/File.html#listFiles(java.io.FileFilter)
(print-all (.listFiles (java.io.File. ".") dir-file-filter))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment