Package org.apache.commons.vfs2
Enum FileType
- java.lang.Object
-
- java.lang.Enum<FileType>
-
- org.apache.commons.vfs2.FileType
-
-
Enum Constant Summary
Enum Constants Enum Constant Description FILEA regular file.FILE_OR_FOLDERA file or folder.FOLDERA folder.IMAGINARYA file that does not exist.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetName()Returns the name of this type.booleanhasAttributes()Returns true if files of this type may have attributes.booleanhasChildren()Returns true if files of this type may contain other files.booleanhasContent()Returns true if files of this type may have data content.java.lang.StringtoString()Returns the name of this type.static FileTypevalueOf(java.lang.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.
-
-
-
Enum Constant Detail
-
FOLDER
public static final FileType FOLDER
A folder. May contain other files, and have attributes, but does not have any data content.
-
FILE
public static final FileType FILE
A regular file. May have data content and attributes, but cannot contain other files.
-
FILE_OR_FOLDER
public static final FileType FILE_OR_FOLDER
A file or folder. May have data content and attributes, and can contain other files.
-
-
Method Detail
-
values
public static FileType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (FileType c : FileType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static FileType valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
getName
public java.lang.String getName()
Returns the name of this type.- Returns:
- The name of the type.
-
hasAttributes
public boolean hasAttributes()
Returns true if files of this type may have attributes.- Returns:
- true if files can have attributes
-
hasChildren
public boolean hasChildren()
Returns true if files of this type may contain other files.- Returns:
- true if files can contain other files.
-
hasContent
public boolean hasContent()
Returns true if files of this type may have data content.- Returns:
- true if files can have content.
-
-