* Get all the files in a directory. This recursively gets the files from
* sub directories as well
*
* @param parentDir
* @return
* @throws FileNotFoundException
*/
private static List
throws FileNotFoundException {
List
File[] filesAndDirs = parentDir.listFiles();
List
for (File file : filesDirs) {
result.add(file);
if (file.isFile() == false) {
List
result.addAll(deeperList);
}
}
return result;
}
No comments:
Post a Comment