You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Daniel <za...@gmail.com> on 2010/11/08 00:03:59 UTC

[vfs] Unable to use special folders (Network, recent, computer, libraries, etc).

I'm trying to build a file browser but got a few problems.

1) I want to support special folders (Network, recent, computer, libraries,
etc) but it seems that VFS doesn't support these?

So I'm getting these folders same as JFileChooser:

File[] cbFolders =
(File[])sun.awt.shell.ShellFolder.get("fileChooserComboBoxFolders");

and then converting them to FileObjects like so:

for(File f: rootfiles){
fileObjArray.add(mgr.resolveFile(f.getPath()));
 }

Any help in getting this working will be great in getting this working.

2) Any way to work out what is a system file/folder? I could check for .sys
for one type of system files but doesn't help for the rest.
JFileChooser seems to hide these files(but still show hidden files), so
there must be a way...

3) How do you get the native file from a FileObject? I have for now
made getLocalFile() public as I couldn't see any other way.

4) Is their a method for getting a icon from a FileObject?

5) For compressed files do I need manually check if VFS supports it and then
open it it? I had hoped that getChildren() on a zip file would auto sort
everything out.

Thanks
-Daniel