Package org.restlet.engine.local
Class FileEntity
java.lang.Object
org.restlet.engine.local.Entity
org.restlet.engine.local.FileEntity
Local entity based on a regular
File.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanexists()Indicates if the entity does exist.Returns the list of contained entities if the current entity is a directory, null otherwise.getFile()Returns the underlying regular file.getName()Returns the name.Returns the parent directory (if any).getRepresentation(MediaType defaultMediaType, int timeToLive) Returns a representation of this local entity.booleanIndicates if the entity is a directory.booleanisNormal()Indicates if the entity is a normal entity, especially if it is not a directory.Methods inherited from class org.restlet.engine.local.Entity
getBaseName, getBaseName, getExtensions, getExtensions, getExtensions, getMetadataService, getVariant, updateMetadata
-
Constructor Details
-
FileEntity
Constructor.- Parameters:
file- The underlying file.metadataService- The metadata service to use.
-
-
Method Details
-
exists
public boolean exists()Description copied from class:EntityIndicates if the entity does exist. -
getChildren
Description copied from class:EntityReturns the list of contained entities if the current entity is a directory, null otherwise.- Specified by:
getChildrenin classEntity- Returns:
- The list of contained entities.
-
getFile
Returns the underlying regular file.- Returns:
- The underlying regular file.
-
getName
Description copied from class:EntityReturns the name. -
getParent
Description copied from class:EntityReturns the parent directory (if any). -
getRepresentation
Description copied from class:EntityReturns a representation of this local entity.- Specified by:
getRepresentationin classEntity- Returns:
- A representation of this entity.
-
isDirectory
public boolean isDirectory()Description copied from class:EntityIndicates if the entity is a directory.- Specified by:
isDirectoryin classEntity- Returns:
- True if the entity is a directory.
-
isNormal
public boolean isNormal()Description copied from class:EntityIndicates if the entity is a normal entity, especially if it is not a directory.
-