Top Fields Constructors Methods
sun.awt.shell

pack-priv Class DefaultShellFolder

extends ShellFolder
Class Inheritance
Annotations
@SuppressWarnings:serial
Imports
java.io.File, .Serial

Author
Michael Martak
Since
1.4

Field Summary

Inherited from sun.awt.shell.ShellFolder:
COLUMN_DATECOLUMN_NAMECOLUMN_SIZEparent

Constructor Summary

AccessConstructor and Description
pack-priv
DefaultShellFolder(ShellFolder parent, File f)

Create a file system shell folder from a file

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

The name used to display this shell folder
getDisplayName
()

Implements abstract sun.awt.shell.ShellFolder.getDisplayName.

public String

Returns:

The executable type as a string
getExecutableType
()

Implements abstract sun.awt.shell.ShellFolder.getExecutableType.

public String

Returns:

The type of shell folder as a string
getFolderType
()

Implements abstract sun.awt.shell.ShellFolder.getFolderType.

public ShellFolder

Returns:

The shell folder linked to by this shell folder, or null if this shell folder is not a link
getLinkLocation
()

Implements abstract sun.awt.shell.ShellFolder.getLinkLocation.

public boolean

Returns:

Whether this shell folder is marked as hidden
isHidden
()

Overrides java.io.File.isHidden.

Tests whether the file named by this abstract pathname is a hidden file.
public File[]

Returns:

An array of shell folders that are children of this shell folder object, null if this shell folder is empty.
listFiles
()

Overrides sun.awt.shell.ShellFolder.listFiles.

Returns an array of abstract pathnames denoting the files in the directory denoted by this abstract pathname.
protected Object

Returns:

a java.io.File replacement object.
writeReplace
()

Implements abstract sun.awt.shell.ShellFolder.writeReplace.

This method is implemented to make sure that no instances of ShellFolder are ever serialized.
Inherited from sun.awt.shell.ShellFolder:
canReadcanWritecompareTocreateNewFiledeletedeleteOnExitexistsgetgetAbsoluteFilegetFolderColumnsgetFolderColumnsgetFolderColumnValuegetFolderColumnValuegetIcongetIcongetNormalizedFilegetParentgetParentFilegetShellFolderinvokeinvokeisAbsoluteisComputerNodeisDirectoryisFileisFileSystemisFileSystemRootlastModifiedlengthlistFilesmkdirmkdirsrenameTosetLastModifiedsetReadOnlysortsortChildrentoString

Constructor Detail

DefaultShellFolderback to summary
pack-priv DefaultShellFolder(ShellFolder parent, File f)

Create a file system shell folder from a file

Method Detail

getDisplayNameback to summary
public String getDisplayName()

Implements abstract sun.awt.shell.ShellFolder.getDisplayName.

Returns:String

The name used to display this shell folder

getExecutableTypeback to summary
public String getExecutableType()

Implements abstract sun.awt.shell.ShellFolder.getExecutableType.

Returns:String

The executable type as a string

getFolderTypeback to summary
public String getFolderType()

Implements abstract sun.awt.shell.ShellFolder.getFolderType.

Returns:String

The type of shell folder as a string

getLinkLocationback to summary
public ShellFolder getLinkLocation()

Implements abstract sun.awt.shell.ShellFolder.getLinkLocation.

Returns:ShellFolder

The shell folder linked to by this shell folder, or null if this shell folder is not a link

isHiddenback to summary
public boolean isHidden()

Overrides java.io.File.isHidden.

Doc from java.io.File.isHidden.

Tests whether the file named by this abstract pathname is a hidden file. The exact definition of hidden is system-dependent. On UNIX systems, a file is considered to be hidden if its name begins with a period character ('.'). On Microsoft Windows systems, a file is considered to be hidden if it has been marked as such in the filesystem.

Returns:boolean

Whether this shell folder is marked as hidden

listFilesback to summary
public File[] listFiles()

Overrides sun.awt.shell.ShellFolder.listFiles.

Doc from java.io.File.listFiles.

Returns an array of abstract pathnames denoting the files in the directory denoted by this abstract pathname.

If this abstract pathname does not denote a directory, then this method returns null. Otherwise an array of File objects is returned, one for each file or directory in the directory. Pathnames denoting the directory itself and the directory's parent directory are not included in the result. Each resulting abstract pathname is constructed from this abstract pathname using the File(File, String) constructor. Therefore if this pathname is absolute then each resulting pathname is absolute; if this pathname is relative then each resulting pathname will be relative to the same directory.

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 java.nio.file.Files class defines the newDirectoryStream method to open a directory and iterate over the names of the files in the directory. This may use less resources when working with very large directories.

Returns:File[]

An array of shell folders that are children of this shell folder object, null if this shell folder is empty.

writeReplaceback to summary
protected Object writeReplace() throws ObjectStreamException

Implements abstract sun.awt.shell.ShellFolder.writeReplace.

This method is implemented to make sure that no instances of ShellFolder are ever serialized. An instance of this default implementation can always be represented with a java.io.File object instead.

Returns:Object

a java.io.File replacement object.

Annotations
@Serial