Using javax.swing.filechooser.FileSystemView

T

thom.bishop

I have a question about using FileSystemView. On Windows I would like
to be able to obtain
a top level lists of folders (and files), such as one would see in
explorer with the "Desktop",
"MyComputer" including any mapped devices. When I use
FileSystemView.getRoots() I only
get the Desktop which if I do getFiles(), I get list of objects that
are on the Desktop. I'm not
get "My Computer" or any of the system Drives or devices, etc. I
believe the FileSystemView
can be used to obtain all of the information that I would like, but I
don't see how it can be used
to accomplish this. Could someone please shed some light on this?

Thanks.

-- tb
 
T

thom.bishop

I have a question about using FileSystemView. On Windows I would like
to be able to obtain
a top level lists of folders (and files), such as one would see in
explorer with the "Desktop",
"MyComputer" including any mapped devices. When I use
FileSystemView.getRoots() I only
get the Desktop which if I do getFiles(), I get list of objects that
are on the Desktop. I'm not
get "My Computer" or any of the system Drives or devices, etc. I
believe the FileSystemView
can be used to obtain all of the information that I would like, but I
don't see how it can be used
to accomplish this. Could someone please shed some light on this?

Thanks.

-- tb

Okay, upon doing some further digging I found that the two file that
had very strange looking
names where actually the "My Computer" and "My Network Places" system
folders. Need to use
getSystemDisplayName() instead of getName() to see this. I think that
clears things up, at least
for now.

-- tb
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,898
Latest member
BlairH7607

Latest Threads

Top