Created
January 12, 2013 06:55
-
-
Save ageldama/4516489 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 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