Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Swing 1.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## javax.swing.filechooser
Class FileSystemView

    java.lang.Object
      |
      +--javax.swing.filechooser.FileSystemView

public abstract class FileSystemView
extends java.lang.Object

FileSystemView is JFileChooser's gateway to the file system. Since the JDK1.1 File api doesn't allow access to such information as root partitians, file type information, or hidden file bits, this class is designed to intuit as much OS specific file system information as possible. FileSystemView will eventually delegate its responsibilities to io File classes when JDK1.X provides more direct access to file system information. Java Licenses may want to provide a different implemenation of FileSystemView to better handle a given operation system. PENDING(jeff) - need to provide a specification for how Mac/OS2/BeOS/etc file systems can modify FileSystemView to handle their particular type of file system.

Constructor Summary
`FileSystemView()`

Method Summary
`java.io.File` | `createFileObject(java.io.File dir, java.lang.String filename)` Returns a File object constructed in dir from the given filename.
`java.io.File` | `createFileObject(java.lang.String path)` Returns a File object constructed from the given path string.
`abstract java.io.File` | `createNewFolder(java.io.File containingDir)` creates a new folder with a default folder name.
`java.io.File[]` | `getFiles(java.io.File dir, boolean useFileHiding)` gets the list of shown (i.e.
`static FileSystemView` | `getFileSystemView()`
`java.io.File` | `getHomeDirectory()`
`java.io.File` | `getParentDirectory(java.io.File dir)` Returns the parent directory of dir.
`abstract java.io.File[]` | `getRoots()` Returns all root partitians on this system.
`abstract boolean` | `isHiddenFile(java.io.File f)` Returns whether a file is hidden or not.
`abstract boolean` | `isRoot(java.io.File f)` Determines if the given file is a root partition or drive.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### FileSystemView

    public FileSystemView()

Method Detail

### getFileSystemView

    public static FileSystemView getFileSystemView()

### isRoot

    public abstract boolean isRoot(java.io.File f)

  Determines if the given file is a root partition or drive.

### createNewFolder

    public abstract java.io.File createNewFolder(java.io.File containingDir)
                                          throws java.io.IOException

  creates a new folder with a default folder name.

### isHiddenFile

    public abstract boolean isHiddenFile(java.io.File f)

  Returns whether a file is hidden or not.

### getRoots

    public abstract java.io.File[] getRoots()

  Returns all root partitians on this system. For example, on Windows, this would be the A: through Z: drives.

### getHomeDirectory

    public java.io.File getHomeDirectory()

### createFileObject

    public java.io.File createFileObject(java.io.File dir,
                                         java.lang.String filename)

  Returns a File object constructed in dir from the given filename.

### createFileObject

    public java.io.File createFileObject(java.lang.String path)

  Returns a File object constructed from the given path string.

### getFiles

    public java.io.File[] getFiles(java.io.File dir,
                                   boolean useFileHiding)

  gets the list of shown (i.e. not hidden) files

### getParentDirectory

    public java.io.File getParentDirectory(java.io.File dir)

  Returns the parent directory of dir.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Swing 1.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Submit a bug or feature
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-1998 Sun Microsystems, Inc. 901 San Antonio Road,
Palo Alto, California, 94303, U.S.A. All Rights Reserved.