Using javax.swing.filechooser.FileSystemView

Discussion in 'Java' started by thom.bishop@gmail.com, Feb 23, 2007.

  1. Guest

    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
     
    , Feb 23, 2007
    #1
    1. Advertisements

  2. Guest

    On Feb 22, 7:54 pm, wrote:
    > 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
     
    , Feb 23, 2007
    #2
    1. Advertisements

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. dota
    Replies:
    2
    Views:
    1,358
  2. Helen
    Replies:
    0
    Views:
    780
    Helen
    Apr 5, 2004
  3. Joan

    preload filechooser

    Joan, Aug 1, 2005, in forum: Java
    Replies:
    2
    Views:
    412
    Knute Johnson
    Aug 1, 2005
  4. lizard
    Replies:
    0
    Views:
    1,861
    lizard
    Jan 30, 2006
  5. S.T
    Replies:
    2
    Views:
    649
Loading...

Share This Page