Skip to content

Instantly share code, notes, and snippets.

@liudong
Created October 25, 2012 06:25
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 liudong/3950833 to your computer and use it in GitHub Desktop.
Save liudong/3950833 to your computer and use it in GitHub Desktop.
Java: List Files in Folder
File folder = new File(FOLDER);
if ( folder.isDirectory() == true ) {
File[] docList = folder.listFiles();
if ( docList != null ) {
for ( File doc : docList ) {
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment