|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.are.platform.FileTypes
public class FileTypes
The FileTypes
class implements a base set of file types that
are common across all platforms supported by ARE.
Field Summary | |
---|---|
static java.lang.String |
COPYRIGHT
Copyright for class bytecode |
static FileTypes |
DIRECTORY
Directory type |
static FileTypes |
FILE
File type |
protected static FileTypes[] |
fileTypeSet
The entire set of known file types, sorted by type name |
static FileTypes |
SYMLINK
Symbolic link type |
static FileTypes |
UNKNOWN
Unknown file type |
Constructor Summary | |
---|---|
FileTypes(java.lang.String name)
Constructs a FileTypes object for the specified file type |
Method Summary | |
---|---|
int |
compareTo(java.lang.Object obj)
Compares two FileTypes objects to see if they are equal. |
boolean |
equals(java.lang.Object obj)
Determines if the FileTypes object equals the
given object. |
FileTypes |
fromPath(java.io.File theFile)
Determines the file type from the given path |
FileTypes |
fromString(java.lang.String theFile)
Determines the file type from the given string |
java.lang.String |
getName()
Retrieves the name of the file type |
boolean |
isDirectory()
Determines if the file type object represents a directory |
boolean |
isFile()
Determines if the file type object represents a file |
boolean |
isSymbolicLink()
Determines if the file type object represents a symbolic link |
boolean |
isUnknown()
Determines if the file type object represents an unknown file type |
java.lang.String |
toString()
Returns a string representation of the object |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String COPYRIGHT
public static final FileTypes DIRECTORY
public static final FileTypes FILE
public static final FileTypes SYMLINK
public static final FileTypes UNKNOWN
protected static FileTypes[] fileTypeSet
Constructor Detail |
---|
public FileTypes(java.lang.String name)
FileTypes
object for the specified file type
name
- The name of the file typeMethod Detail |
---|
public java.lang.String getName()
public boolean isDirectory()
true
if the file type object represents a directory,
false
if it does notpublic boolean isFile()
true
if the file type object represents a file,
false
if it does notpublic boolean isSymbolicLink()
true
if the file type object represents a symbolic link,
false
if it does notpublic boolean isUnknown()
true
if the file type object represents an unknown,
file type, false
if it does notpublic FileTypes fromString(java.lang.String theFile)
fromString
in interface FileTypeIdentifier
theFile
- A string representing the file. This string is typically
just a file path.
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object obj)
FileTypes
object equals the
given object.
equals
in class java.lang.Object
true
if the two objects are equal, false
if
they are not. Equality is determined by comparing the file type
name of the two objects.public int compareTo(java.lang.Object obj)
FileTypes
objects to see if they are equal.
compareTo
in interface java.lang.Comparable
FileTypes
object is lexicographically less than the input object0 if the two objects represent the exact same file type
1 if the FileTypes
object is lexicographically greater than the input object
public FileTypes fromPath(java.io.File theFile)
fromPath
in interface FileTypeIdentifier
theFile
- The full path and name of the file
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |