FileDocCategorySizeDatePackage
FileSystemViewer.javaAPI DocExample630Tue Feb 14 13:48:04 GMT 2006None

FileSystemViewer

public class FileSystemViewer extends Object

Fields Summary
Constructors Summary
Methods Summary
public static voidmain(java.lang.String[] args)

    
    JFileChooser chooser = new JFileChooser();
    FileSystemView view = chooser.getFileSystemView();
    
    System.out.println("The home directory is " + view.getHomeDirectory());
    System.out.println("The default directory is " + view.getDefaultDirectory());
    System.out.println("The roots of this filesystem are: ");
    File[] roots = view.getRoots();
    for (int i = 0; i < roots.length; i++) {
      System.out.println("  " + roots[i]);
    }