Created
June 3, 2011 10:11
-
-
Save osima/1006133 to your computer and use it in GitHub Desktop.
get txt filelist
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
| def getTxtFileList = { dir-> | |
| def list=[] | |
| dir.listFiles( { it.name.endsWith('.txt') } as FileFilter ).each{ list.add(it) } | |
| list | |
| } | |
| getTxtFileList(new File('.')).each{ println it } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment