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.
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.
(*get-file-system-view)
returns: javax.swing.filechooser.FileSystemView
returns: `javax.swing.filechooser.FileSystemView`
(computer-node? this dir)
Used by UI classes to decide whether to display a special icon for a computer node, e.g. "My Computer" or a network server.
The default implementation has no way of knowing, so always returns false.
dir - a directory - java.io.File
returns: false always - boolean
Used by UI classes to decide whether to display a special icon for a computer node, e.g. "My Computer" or a network server. The default implementation has no way of knowing, so always returns false. dir - a directory - `java.io.File` returns: false always - `boolean`
(create-file-object this path)
(create-file-object this dir filename)
Returns a File object constructed in dir from the given filename.
dir - java.io.File
filename - java.lang.String
returns: java.io.File
Returns a File object constructed in dir from the given filename. dir - `java.io.File` filename - `java.lang.String` returns: `java.io.File`
(create-new-folder this containing-dir)
Creates a new folder with a default folder name.
containing-dir - java.io.File
returns: java.io.File
throws: java.io.IOException
Creates a new folder with a default folder name. containing-dir - `java.io.File` returns: `java.io.File` throws: java.io.IOException
(drive? this dir)
Used by UI classes to decide whether to display a special icon for drives or partitions, e.g. a "hard disk" icon.
The default implementation has no way of knowing, so always returns false.
dir - a directory - java.io.File
returns: false always - boolean
Used by UI classes to decide whether to display a special icon for drives or partitions, e.g. a "hard disk" icon. The default implementation has no way of knowing, so always returns false. dir - a directory - `java.io.File` returns: false always - `boolean`
(file-system-root? this dir)
Is dir the root of a tree in the file system, such as a drive or partition. Example: Returns true for "C:" on Windows 98.
dir - a File object representing a directory - java.io.File
returns: true if f is a root of a filesystem - boolean
Is dir the root of a tree in the file system, such as a drive or partition. Example: Returns true for "C:\" on Windows 98. dir - a File object representing a directory - `java.io.File` returns: true if f is a root of a filesystem - `boolean`
(file-system? this f)
Checks if f represents a real directory or file as opposed to a special folder such as "Desktop". Used by UI classes to decide if a folder is selectable when doing directory choosing.
f - a File object - java.io.File
returns: true if f is a real file or directory. - boolean
Checks if f represents a real directory or file as opposed to a special folder such as "Desktop". Used by UI classes to decide if a folder is selectable when doing directory choosing. f - a File object - `java.io.File` returns: true if f is a real file or directory. - `boolean`
(floppy-drive? this dir)
Used by UI classes to decide whether to display a special icon for a floppy disk. Implies isDrive(dir).
The default implementation has no way of knowing, so always returns false.
dir - a directory - java.io.File
returns: false always - boolean
Used by UI classes to decide whether to display a special icon for a floppy disk. Implies isDrive(dir). The default implementation has no way of knowing, so always returns false. dir - a directory - `java.io.File` returns: false always - `boolean`
(get-child this parent file-name)
parent - a File object representing a directory or special folder - java.io.File
file-name - a name of a file or folder which exists in parent - java.lang.String
returns: a File object. This is normally constructed with new
File(parent, fileName) except when parent and child are both
special folders, in which case the File is a wrapper containing
a ShellFolder object. - java.io.File
parent - a File object representing a directory or special folder - `java.io.File` file-name - a name of a file or folder which exists in parent - `java.lang.String` returns: a File object. This is normally constructed with new File(parent, fileName) except when parent and child are both special folders, in which case the File is a wrapper containing a ShellFolder object. - `java.io.File`
(get-default-directory this)
Return the user's default starting directory for the file chooser.
returns: a File object representing the default
starting folder - java.io.File
Return the user's default starting directory for the file chooser. returns: a File object representing the default starting folder - `java.io.File`
(get-files this dir use-file-hiding)
Gets the list of shown (i.e. not hidden) files.
dir - java.io.File
use-file-hiding - boolean
returns: java.io.File[]
Gets the list of shown (i.e. not hidden) files. dir - `java.io.File` use-file-hiding - `boolean` returns: `java.io.File[]`
(get-home-directory this)
returns: java.io.File
returns: `java.io.File`
(get-parent-directory this dir)
Returns the parent directory of dir.
dir - the File being queried - java.io.File
returns: the parent directory of dir, or
null if dir is null - java.io.File
Returns the parent directory of dir. dir - the File being queried - `java.io.File` returns: the parent directory of dir, or null if dir is null - `java.io.File`
(get-roots this)
Returns all root partitions on this system. For example, on Windows, this would be the "Desktop" folder, while on DOS this would be the A: through Z: drives.
returns: java.io.File[]
Returns all root partitions on this system. For example, on Windows, this would be the "Desktop" folder, while on DOS this would be the A: through Z: drives. returns: `java.io.File[]`
(get-system-display-name this f)
Name of a file, directory, or folder as it would be displayed in a system file browser. Example from Windows: the "M:" directory displays as "CD-ROM (M:)"
The default implementation gets information from the ShellFolder class.
f - a File object - java.io.File
returns: the file name as it would be displayed by a native file chooser - java.lang.String
Name of a file, directory, or folder as it would be displayed in a system file browser. Example from Windows: the "M:\" directory displays as "CD-ROM (M:)" The default implementation gets information from the ShellFolder class. f - a File object - `java.io.File` returns: the file name as it would be displayed by a native file chooser - `java.lang.String`
(get-system-icon this f)
Icon for a file, directory, or folder as it would be displayed in a system file browser. Example from Windows: the "M:" directory displays a CD-ROM icon.
The default implementation gets information from the ShellFolder class.
f - a File object - java.io.File
returns: an icon as it would be displayed by a native file chooser - javax.swing.Icon
Icon for a file, directory, or folder as it would be displayed in a system file browser. Example from Windows: the "M:\" directory displays a CD-ROM icon. The default implementation gets information from the ShellFolder class. f - a File object - `java.io.File` returns: an icon as it would be displayed by a native file chooser - `javax.swing.Icon`
(get-system-type-description this f)
Type description for a file, directory, or folder as it would be displayed in a system file browser. Example from Windows: the "Desktop" folder is described as "Desktop".
Override for platforms with native ShellFolder implementations.
f - a File object - java.io.File
returns: the file type description as it would be displayed by a native file chooser
or null if no native information is available. - java.lang.String
Type description for a file, directory, or folder as it would be displayed in a system file browser. Example from Windows: the "Desktop" folder is described as "Desktop". Override for platforms with native ShellFolder implementations. f - a File object - `java.io.File` returns: the file type description as it would be displayed by a native file chooser or null if no native information is available. - `java.lang.String`
(hidden-file? this f)
Returns whether a file is hidden or not.
f - java.io.File
returns: boolean
Returns whether a file is hidden or not. f - `java.io.File` returns: `boolean`
(parent? this folder file)
On Windows, a file can appear in multiple folders, other than its parent directory in the filesystem. Folder could for example be the "Desktop" folder which is not the same as file.getParentFile().
folder - a File object representing a directory or special folder - java.io.File
file - a File object - java.io.File
returns: true if folder is a directory or special folder and contains file. - boolean
On Windows, a file can appear in multiple folders, other than its parent directory in the filesystem. Folder could for example be the "Desktop" folder which is not the same as file.getParentFile(). folder - a File object representing a directory or special folder - `java.io.File` file - a File object - `java.io.File` returns: true if folder is a directory or special folder and contains file. - `boolean`
(root? this f)
Determines if the given file is a root in the navigable tree(s). Examples: Windows 98 has one root, the Desktop folder. DOS has one root per drive letter, C:, D:, etc. Unix has one root, the "/" directory.
The default implementation gets information from the ShellFolder class.
f - a File object representing a directory - java.io.File
returns: true if f is a root in the navigable tree. - boolean
Determines if the given file is a root in the navigable tree(s). Examples: Windows 98 has one root, the Desktop folder. DOS has one root per drive letter, C:\, D:\, etc. Unix has one root, the "/" directory. The default implementation gets information from the ShellFolder class. f - a File object representing a directory - `java.io.File` returns: true if f is a root in the navigable tree. - `boolean`
(traversable? this f)
Returns true if the file (directory) can be visited. Returns false if the directory cannot be traversed.
f - the File - java.io.File
returns: true if the file/directory can be traversed, otherwise false - java.lang.Boolean
Returns true if the file (directory) can be visited. Returns false if the directory cannot be traversed. f - the File - `java.io.File` returns: true if the file/directory can be traversed, otherwise false - `java.lang.Boolean`
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close