public void recursiveFunc(File dir) {
if (dir.isDirectory()) {
String[] children = dir.list();
for (int i = 0; i < children.length; i++) {
recursiveFunc(new File(dir, children[i]));
}
} else if (dir.isFile()) {
// here is a file.. let's check
// whatever you want to do with the file
}
}
}