com.sun.xfilechooser
public abstract class XFileSystemView extends javax.swing.filechooser.FileSystemView
Constructor and Description |
---|
XFileSystemView() |
Modifier and Type | Method and Description |
---|---|
java.io.File |
createFileObject(java.io.File dir,
java.lang.String filename)
Creates a File object constructed from File obj and filename
|
java.io.File |
createFileObject(java.lang.String path)
Creates a file object constructed from give pathname
|
java.io.File[] |
getFiles(java.io.File dir,
boolean useFileHiding)
Returns the list of files in a directory
|
static javax.swing.filechooser.FileSystemView |
getFileSystemView()
Depending on type of operating system (e.g.
|
java.io.File |
getHomeDirectory()
Returns the user's home directory
|
java.io.File |
getParentDirectory(java.io.File dir)
Returns the parent directory of specified directory/file object
|
boolean |
isRoot(java.io.File f)
Returns true if the given file object is root.
|
createFileSystemRoot, createNewFolder, getChild, getDefaultDirectory, getRoots, getSystemDisplayName, getSystemIcon, getSystemTypeDescription, isComputerNode, isDrive, isFileSystem, isFileSystemRoot, isFloppyDrive, isHiddenFile, isParent, isTraversable
public static javax.swing.filechooser.FileSystemView getFileSystemView()
public java.io.File createFileObject(java.io.File dir, java.lang.String filename)
createFileObject
in class javax.swing.filechooser.FileSystemView
dir
- file object of directoryfilename
- name of file in directorypublic java.io.File createFileObject(java.lang.String path)
createFileObject
in class javax.swing.filechooser.FileSystemView
public java.io.File[] getFiles(java.io.File dir, boolean useFileHiding)
getFiles
in class javax.swing.filechooser.FileSystemView
dir
- directoryuseFileHiding
- flag to indicate to either show files hidden or not.public java.io.File getHomeDirectory()
getHomeDirectory
in class javax.swing.filechooser.FileSystemView
public java.io.File getParentDirectory(java.io.File dir)
getParentDirectory
in class javax.swing.filechooser.FileSystemView
dir
- directorypublic boolean isRoot(java.io.File f)
isRoot
in class javax.swing.filechooser.FileSystemView
f
- file object to check if root