Module java.desktop

Class FileSystemView

java.lang.Object
javax.swing.filechooser.FileSystemView

public abstract class FileSystemView extends 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 partitions, file type information, or hidden file bits, this class is designed to intuit as much OS-specific file system information as possible.

Java Licensees may want to provide a different implementation of FileSystemView to better handle a given operating system.

  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructs a FileSystemView.
  • Method Summary

    Modifier and Type
    Method
    Description
    createFileObject(File dir, String filename)
    Returns a File object constructed in dir from the given filename.
    Returns a File object constructed from the given path string.
    protected File
    Creates a new File object for f with correct behavior for a file system root directory.
    abstract File
    createNewFolder(File containingDir)
    Creates a new folder with a default folder name.
    getChild(File parent, String fileName)
     
    Returns an array of files representing the values which will be shown in the file chooser selector.
    final File[]
    Returns an array of files representing the values to show by default in the file chooser shortcuts panel.
    Return the user's default starting directory for the file chooser.
    getFiles(File dir, boolean useFileHiding)
    Gets the list of shown (i.e. not hidden) files.
    Returns the file system view.
    Returns the home directory.
    Returns the regular file referenced by the specified link file if the specified file is a shell interpreted link.
    Returns the parent directory of dir.
    Returns all root partitions on this system.
    Name of a file, directory, or folder as it would be displayed in a system file browser.
    Icon for a file, directory, or folder as it would be displayed in a system file browser.
    getSystemIcon(File f, int width, int height)
    Returns an icon for a file, directory, or folder as it would be displayed in a system file browser for the requested size.
    Type description for a file, directory, or folder as it would be displayed in a system file browser.
    boolean
    Used by UI classes to decide whether to display a special icon for a computer node, e.g.
    boolean
    Used by UI classes to decide whether to display a special icon for drives or partitions, e.g. a "hard disk" icon.
    boolean
    Checks if f represents a real directory or file as opposed to a special folder such as "Desktop".
    boolean
    Is dir the root of a tree in the file system, such as a drive or partition.
    boolean
    Used by UI classes to decide whether to display a special icon for a floppy disk.
    boolean
    Returns whether a file is hidden or not.
    boolean
    isLink(File file)
    Returns whether the specified file denotes a shell interpreted link which can be obtained by the getLinkLocation(File).
    boolean
    isParent(File folder, File file)
    On Windows, a file can appear in multiple folders, other than its parent directory in the filesystem.
    boolean
    Determines if the given file is a root in the navigable tree(s).
    Returns true if the file (directory) can be visited.

    Methods declared in class java.lang.Object

    clone,