Monday, February 16, 2009

Listing all drives on a file system

You can list the drives of the system by using the listRoots() method of the File class:

File[] roots = File.listRoots();for(int i=0;i
System.out.println("Root["+i+"]:" + roots[i]);

source: java-tips.org

No comments:

Computers Add to Technorati Favorites Programming Blogs - BlogCatalog Blog Directory