How do I recursively list all files under a directory in Java? Does the framework provide any utility?
I saw a lot of hacky implementations. But none from the fra
private void fillFilesRecursively(File file, List resultFiles) { if (file.isFile()) { resultFiles.add(file); } else { for (File child : file.listFiles()) { fillFilesRecursively(child, resultFiles); } } }