I have the following code. I cant find the source for the problem.
public class ConsoleApp1 {
public static void main(String[] args) {
allFiles("C:\\");
}
private static void allFiles(String root) {
File ro = new File("e:\\");
File[] flist = ro.listFiles();
for (File i: flist) {
if (i.isFile()) {
System.out.println(i.getAbsolutePath());
} else {
allFiles(i.getAbsolutePath());
}
}
}
}
I am in the future going to add this to swing application, A call from button will get the list and populate them into a JTree
any advice on that would also help.