Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

populate a drobdownbox with drive letters? 1

Status
Not open for further replies.

russland

Programmer
Jan 9, 2003
315
0
0
CH
hey,

how could i read the available drive letters of a user's system? does java.io.file offer such a method? i wasn't able to find one. (this applet will run on windows pc only. so i don't have to worry about unix or mac users)

thanks for any help.
 
yes, looping through the returned list provides me with what i need. cheers.
 
File.listRoots(); will return just the root of the directory tree in Unix/Linux so if you want to list mounted drives Unix/Linux you'll have to jump through more hoops. Just a comment for if the code is to be cross platform.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top