|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | |||||||||
java.lang.Objectjava.lang.Enum<FileType>
org.marketcetera.util.file.FileType
public enum FileType
A file type. Files on NTFS are limited to the following types:
NONEXISTENT, FILE, DIR (folder), and
UNKNOWN (the file may or may not exist, and, if it does,
its type cannot be determined). On Linux, LINK_FILE and
LINK_DIR also apply to symbolic links that point to
symbolic links (and so on) that eventually point to a file or
directory, respectively.
| Enum Constant Summary | |
|---|---|
DIR
|
|
FILE
|
|
LINK_DIR
|
|
LINK_FILE
|
|
LINK_UNKNOWN
|
|
NONEXISTENT
|
|
UNKNOWN
|
|
| Method Summary | |
|---|---|
static FileType |
get(File file)
Returns the enumerated constant representing the type of the given file. |
static FileType |
get(String name)
Returns the enumerated constant representing the type of the file with the given name. |
boolean |
isDirectory()
Returns true if the receiver represents a directory (possibly via a symbolic link). |
boolean |
isFile()
Returns true if the receiver represents a plain file (possibly via a symbolic link). |
boolean |
isSymbolicLink()
Returns true if the receiver represents a symbolic link. |
static FileType |
valueOf(String name)
Returns the enum constant of this type with the specified name. |
static FileType[] |
values()
Returns an array containing the constants of this enum type, in the order they are declared. |
| Methods inherited from class java.lang.Enum |
|---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Enum Constant Detail |
|---|
public static final FileType NONEXISTENT
public static final FileType LINK_FILE
public static final FileType FILE
public static final FileType LINK_DIR
public static final FileType DIR
public static final FileType LINK_UNKNOWN
public static final FileType UNKNOWN
| Method Detail |
|---|
public static FileType[] values()
for (FileType c : FileType.values()) System.out.println(c);
public static FileType valueOf(String name)
name - the name of the enum constant to be returned.
IllegalArgumentException - if this enum type has no constant
with the specified name
NullPointerException - if the argument is nullpublic static final FileType get(File file)
file - The file. It may be null, in which case
UNKNOWN is returned.
public static final FileType get(String name)
name - The file name. It may be null, in which case UNKNOWN is returned.
public boolean isSymbolicLink()
public boolean isDirectory()
public boolean isFile()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | |||||||||