org.apache.commons.vfs
Class FileType

java.lang.Object
  extended by org.apache.commons.vfs.FileType

public final class FileType
extends java.lang.Object

An enumerated type that represents a file's type.

Version:
$Revision: 764356 $ $Date: 2009-04-13 06:06:01 +0200 (Mo, 13. Apr 2009) $
Author:
Adam Murdoch

Field Summary
static FileType FILE
          A regular file.
static FileType FILE_OR_FOLDER
          A file or folder.
static FileType FOLDER
          A folder.
static FileType IMAGINARY
          A file that does not exist.
 
Method Summary
 java.lang.String getName()
          Returns the name of this type.
 boolean hasAttributes()
          Returns true if files of this type may have attributes.
 boolean hasChildren()
          Returns true if files of this type may contain other files.
 boolean hasContent()
          Returns true if files of this type may have data content.
 java.lang.String toString()
          Returns the name of this type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field 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.


IMAGINARY

public static final FileType IMAGINARY
A file that does not exist. May not have data content, attributes, or contain other files.

Method Detail

toString

public java.lang.String toString()
Returns the name of this type.

Overrides:
toString in class java.lang.Object
Returns:
The name of this type.

getName

public java.lang.String getName()
Returns the name of this type.

Returns:
The name of the type.

hasChildren

public boolean hasChildren()
Returns true if files of this type may contain other files.

Returns:
tru 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.

hasAttributes

public boolean hasAttributes()
Returns true if files of this type may have attributes.

Returns:
true if files can have attributes


Copyright © 2002-2009 Apache Software Foundation. All Rights Reserved.