| Modifier and Type | Class and Description |
|---|---|
| public static interface | ShellFolder.
Interface allowing to invoke tasks in different environments on different platforms. |
| Modifier and Type | Field and Description |
|---|---|
| public static final String | |
| public static final String | |
| public static final String | |
| private static final Comparator | DEFAULT_COMPARATOR
Provides a default comparator for the default column set |
| private static final Comparator | |
| private static final ShellFolder. | |
| protected ShellFolder | |
| private static final ShellFolderManager |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | canRead()
Overrides java. Tests whether the application can read the file located by this abstract pathname. |
| public boolean | |
| public int | compareTo(File file2)
Overrides java. Implements java. Compares this ShellFolder with the specified ShellFolder for order. |
| public boolean | createNewFile()
Overrides java. Atomically creates a new, empty file named by this abstract pathname if and only if a file with this name does not yet exist. |
| public boolean | delete()
Overrides java. Deletes the file or directory located by this abstract pathname. |
| public void | deleteOnExit()
Overrides java. Requests that the file or directory located by this abstract pathname be deleted when the virtual machine terminates. |
| public boolean | exists()
Overrides java. Tests whether the file or directory located by this abstract pathname exists. |
| public static Object | |
| public File | getAbsoluteFile()
Overrides java. Returns the absolute form of this abstract pathname. |
| public abstract String | |
| public abstract String | |
| public static ShellFolderColumnInfo[] | |
| public ShellFolderColumnInfo[] | |
| public static Object | |
| public Object | |
| public abstract String | |
| public Image | getIcon(boolean
whether to return large icon (ignored in base implementation) getLargeIcon)Returns: The icon used to display this shell folder |
| public Image | Returns: The icon of the specified size used to display this shell folderwidth of the icon > 0 width, int height of the icon > 0 height)Returns the icon of the specified size used to display this shell folder. |
| public abstract ShellFolder | getLinkLocation()
Returns: The shell folder linked to by this shell folder, or null if this shell folder is not a link |
| public static File | |
| public String | Returns: the path as a String for this object's parent, ornull if this object does not name a parent
folderOverrides java. Returns the path for this object's parent,
or |
| public File | Returns: a File object representing this object's parent, ornull if this object does not name a parent
folderOverrides java. Returns a File object representing this object's parent,
or |
| public static ShellFolder | |
| public static <T> T | |
| public static <T, E extends Throwable> T | |
| public boolean | |
| public static boolean | isComputerNode(File dir)
Does |
| public boolean | isDirectory()
Overrides java. Tests whether the file located by this abstract pathname is a directory. |
| public boolean | isFile()
Overrides java. Tests whether the file located by this abstract pathname is a normal file. |
| public boolean | |
| public static boolean | |
| public abstract boolean | |
| public long | lastModified()
Overrides java. Returns the time that the file located by this abstract pathname was last modified. |
| public long | length()
Overrides java. Returns the length of the file located by this abstract pathname. |
| public File[] | listFiles()
Overrides java. Returns an array of abstract pathnames locating the files in the directory located by this abstract pathname. |
| public File[] | |
| public boolean | |
| public boolean | mkdirs()
Overrides java. Creates the directory named by this abstract pathname, including any necessary but nonexistent parent directories. |
| public boolean | renameTo(File dest)
Overrides java. Renames the file located by this abstract pathname. |
| public boolean | setLastModified(long time)
Overrides java. Sets the last-modified time of the file or directory located by this abstract pathname. |
| public boolean | setReadOnly()
Overrides java. Marks the file or directory located by this abstract pathname so that only read operations are allowed. |
| public static void | |
| public void | |
| public String | |
| protected abstract Object | Returns: a java.io.File replacement object, or null if no suitable replacement can be found.This method must be implemented to make sure that no instances
of |
| COLUMN_DATE | back to summary |
|---|---|
| public static final String COLUMN_DATE | |
| COLUMN_NAME | back to summary |
|---|---|
| public static final String COLUMN_NAME | |
| COLUMN_SIZE | back to summary |
|---|---|
| public static final String COLUMN_SIZE | |
| DEFAULT_COMPARATOR | back to summary |
|---|---|
| private static final Comparator<Object> DEFAULT_COMPARATOR Provides a default comparator for the default column set | |
| FILE_COMPARATOR | back to summary |
|---|---|
| private static final Comparator<File> FILE_COMPARATOR | |
| invoker | back to summary |
|---|---|
| private static final ShellFolder. | |
| parent | back to summary |
|---|---|
| protected ShellFolder parent | |
| shellFolderManager | back to summary |
|---|---|
| private static final ShellFolderManager shellFolderManager | |
| ShellFolder | back to summary |
|---|---|
| pack-priv ShellFolder(ShellFolder parent, String pathname) Create a file system shell folder from a file | |
| canRead | back to summary |
|---|---|
| public boolean canRead() Overrides java. Doc from java. Tests whether the application can read the file located by this
abstract pathname. On some platforms it may be possible to start the
Java virtual machine with special privileges that allow it to read
files that are marked as unreadable. Consequently, this method may return
| |
| canWrite | back to summary |
|---|---|
| public boolean canWrite() Overrides java. Returns true if folder allows creation of children. True for the "Desktop" folder, but false for the "My Computer" folder. | |
| compareTo | back to summary |
|---|---|
| public int compareTo(File file2) Overrides java. Implements java. Compares this ShellFolder with the specified ShellFolder for order.
| |
| createNewFile | back to summary |
|---|---|
| public boolean createNewFile() throws IOException Overrides java. Doc from java. Atomically creates a new, empty file named by this abstract pathname if and only if a file with this name does not yet exist. The check for the existence of the file and the creation of the file if it does not exist are a single operation that is atomic with respect to all other filesystem activities that might affect the file. Note this method should not be used for file-locking, as
the resulting protocol cannot be made to work reliably. The
| |
| delete | back to summary |
|---|---|
| public boolean delete() Overrides java. Doc from java. Deletes the file or directory located by this abstract pathname. If this pathname locates a directory, then the directory must be empty in order to be deleted. If this pathname locates a symbolic link, then the link itself, not its target, will be deleted. Note that the | |
| deleteOnExit | back to summary |
|---|---|
| public void deleteOnExit() Overrides java. Doc from java. Requests that the file or directory located by this abstract pathname be deleted when the virtual machine terminates. If this pathname locates a symbolic link, then the link itself, not its target, will be deleted. Files (or directories) are deleted in the reverse order that they are registered. Invoking this method to delete a file or directory that is already registered for deletion has no effect. Deletion will be attempted only for normal termination of the virtual machine, as defined by the Java Language Specification. Once deletion has been requested, it is not possible to cancel the request. This method should therefore be used with care. Note this method should not be used for file-locking, as
the resulting protocol cannot be made to work reliably. The
| |
| exists | back to summary |
|---|---|
| public boolean exists() Overrides java. Doc from java. Tests whether the file or directory located by this abstract pathname exists. | |
| get | back to summary |
|---|---|
public static Object get(String key)
| |
| getAbsoluteFile | back to summary |
|---|---|
| public File getAbsoluteFile() Overrides java. Doc from java. Returns the absolute form of this abstract pathname. Equivalent to
| |
| getDisplayName | back to summary |
|---|---|
public abstract String getDisplayName()
| |
| getExecutableType | back to summary |
|---|---|
public abstract String getExecutableType()
| |
| getFolderColumns | back to summary |
|---|---|
| public static ShellFolderColumnInfo[] getFolderColumns(File dir) | |
| getFolderColumns | back to summary |
|---|---|
| public ShellFolderColumnInfo[] getFolderColumns() | |
| getFolderColumnValue | back to summary |
|---|---|
| public static Object getFolderColumnValue(File file, int column) | |
| getFolderColumnValue | back to summary |
|---|---|
| public Object getFolderColumnValue(int column) | |
| getFolderType | back to summary |
|---|---|
public abstract String getFolderType()
| |
| getIcon | back to summary |
|---|---|
public Image getIcon(boolean getLargeIcon)
| |
| getIcon | back to summary |
|---|---|
| public Image getIcon(int width, int height) Returns the icon of the specified size used to display this shell folder.
| |
| getLinkLocation | back to summary |
|---|---|
public abstract ShellFolder getLinkLocation() throws FileNotFoundException
| |
| getNormalizedFile | back to summary |
|---|---|
| public static File getNormalizedFile(File f) throws IOException Canonicalizes files that don't have symbolic links in their path. Normalizes files that do, preserving symbolic links from being resolved. | |
| getParent | back to summary |
|---|---|
| public String getParent() Overrides java. Returns the path for this object's parent,
or
| |
| getParentFile | back to summary |
|---|---|
| public File getParentFile() Overrides java. Returns a File object representing this object's parent,
or
| |
| getShellFolder | back to summary |
|---|---|
| public static ShellFolder getShellFolder(File file) throws FileNotFoundException Return a shell folder from a file object
| |
| invoke | back to summary |
|---|---|
| public static <T> T invoke(Callable<T> task) Invokes the | |
| invoke | back to summary |
|---|---|
| public static <T, E extends Throwable> T invoke(Callable<T> task, Class<E> exceptionClass) throws InterruptedException, Class-:E Invokes the | |
| isAbsolute | back to summary |
|---|---|
| public boolean isAbsolute() Overrides java. Doc from java. Tests whether this abstract pathname is absolute. The definition of
absolute pathname is system dependent. On UNIX systems, a pathname is
absolute if its prefix is | |
| isComputerNode | back to summary |
|---|---|
| public static boolean isComputerNode(File dir) Does | |
| isDirectory | back to summary |
|---|---|
| public boolean isDirectory() Overrides java. Doc from java. Tests whether the file located by this abstract pathname is a directory. Where it is required to distinguish an I/O exception from the case
that the file is not a directory, or where several attributes of the
same file are required at the same time, then the | |
| isFile | back to summary |
|---|---|
| public boolean isFile() Overrides java. Doc from java. Tests whether the file located by this abstract pathname is a normal file. A file is normal if it is not a directory and, in addition, satisfies other system-dependent criteria. Any non-directory file created by a Java application is guaranteed to be a normal file. Where it is required to distinguish an I/O exception from the case
that the file is not a normal file, or where several attributes of the
same file are required at the same time, then the | |
| isFileSystem | back to summary |
|---|---|
public boolean isFileSystem()
| |
| isFileSystemRoot | back to summary |
|---|---|
public static boolean isFileSystemRoot(File dir)
| |
| isLink | back to summary |
|---|---|
public abstract boolean isLink()
| |
| lastModified | back to summary |
|---|---|
| public long lastModified() Overrides java. Doc from java. Returns the time that the file located by this abstract pathname was last modified. | |
| length | back to summary |
|---|---|
| public long length() Overrides java. Doc from java. Returns the length of the file located by this abstract pathname. The return value is unspecified if this pathname locates a directory. Where it is required to distinguish an I/O exception from the case
that | |
| listFiles | back to summary |
|---|---|
| public File[] listFiles() Overrides java. Doc from java. Returns an array of abstract pathnames locating the files in the directory located by this abstract pathname. If this abstract pathname does not locate a directory, then this
method returns There is no guarantee that the name strings in the resulting array will appear in any specific order; they are not, in particular, guaranteed to appear in alphabetical order. Note that the | |
| listFiles | back to summary |
|---|---|
| public File[] listFiles(boolean includeHiddenFiles) | |
| mkdir | back to summary |
|---|---|
| public boolean mkdir() Overrides java. Doc from java. Creates the directory named by this abstract pathname. | |
| mkdirs | back to summary |
|---|---|
| public boolean mkdirs() Overrides java. Doc from java. Creates the directory named by this abstract pathname, including any necessary but nonexistent parent directories. Note that if this operation fails it may have succeeded in creating some of the necessary parent directories. | |
| renameTo | back to summary |
|---|---|
| public boolean renameTo(File dest) Overrides java. Doc from java. Renames the file located by this abstract pathname. If this pathname locates a symbolic link, then the link itself, not its target, will be renamed. Many aspects of the behavior of this method are inherently
platform-dependent: The rename operation might not be able to move a
file from one filesystem to another, it might not be atomic, and it
might not succeed if a file with the destination abstract pathname
already exists. The return value should always be checked to make sure
that the rename operation was successful. As instances of Note that the | |
| setLastModified | back to summary |
|---|---|
| public boolean setLastModified(long time) Overrides java. Doc from java. Sets the last-modified time of the file or directory located by this abstract pathname. All platforms support file-modification times to the nearest second,
but some provide more precision. The argument will be truncated to fit
the supported precision. If the operation succeeds and no intervening
operations on the file take place, then the next invocation of the
| |
| setReadOnly | back to summary |
|---|---|
| public boolean setReadOnly() Overrides java. Doc from java. Marks the file or directory located by this abstract pathname so that only read operations are allowed. After invoking this method the file or directory will not change until it is either deleted or marked to allow write access. On some platforms it may be possible to start the Java virtual machine with special privileges that allow it to modify files that are marked read-only. Whether or not a read-only file or directory may be deleted depends upon the underlying system. | |
| sort | back to summary |
|---|---|
| public static void sort(final List<? extends File> files) | |
| sortChildren | back to summary |
|---|---|
| public void sortChildren(final List<? extends File> files) | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns the pathname string of this abstract pathname. This is just the
string returned by the | |
| writeReplace | back to summary |
|---|---|
| protected abstract Object writeReplace() throws ObjectStreamException This method must be implemented to make sure that no instances
of | |
| Modifier and Type | Method and Description |
|---|---|
| public <T> T |
| invoke | back to summary |
|---|---|
| public <T> T invoke(Callable<T> task) throws Exception Invokes a callable task. | |