Friday, 9 August 2013

Listing a File System's Root Directories?

Listing a File System's Root Directories?

i found a link
http://docs.oracle.com/javase/tutorial/essential/io/dirs.html with a
example
Iterable<Path> dirs = FileSystems.getDefault().getRootDirectories();
for (Path name: dirs) {
System.err.println(name);
}
Can you help me how to use it ? if i want to list a file from "C://" with
code above. sorry my poor english, thanks in advantage :)

No comments:

Post a Comment