I want to be able to list the files in the current directory. I\'ve made something that should work but doesn\'t return all the file names.
File dir = new File(\
Had a quick snoop around for this one, but this looks like it should work. I haven't tested it yet though.
File f = new File("."); // current directory
File[] files = f.listFiles();
for (File file : files) {
if (file.isDirectory()) {
System.out.print("directory:");
} else {
System.out.print(" file:");
}
System.out.println(file.getCanonicalPath());
}