4
Contributors
4
Replies
5
Views
10 Years
Discussion Span
Last Post by Ezzaral
0

thx! I`ve been google`ing and going over the File functions (except this one) for over an hour..

File []drives = new File("").listRoots();
for(int j=0;j<drives.length;j++)
	System.out.println(drives[j]);
0

You don't even need the new File("") part - the method is static.

for(File drive : File.listRoots() )
    System.out.println(drive);

:)

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.