| Constructor and Description |
|---|
FileEntity(File file,
MetadataService metadataService)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
exists()
Indicates if the entity does exist.
|
List<Entity> |
getChildren()
Returns the list of contained entities if the current entity is a directory,
null otherwise.
|
File |
getFile()
Returns the underlying regular file.
|
String |
getName()
Returns the name.
|
Entity |
getParent()
Returns the parent directory (if any).
|
Representation |
getRepresentation(MediaType defaultMediaType,
int timeToLive)
Returns a representation of this local entity.
|
boolean |
isDirectory()
Indicates if the entity is a directory.
|
boolean |
isNormal()
Indicates if the entity is a normal entity, especially if it is not a
directory.
|
getBaseName, getBaseName, getExtensions, getExtensions, getExtensions, getMetadataService, getVariant, updateMetadatapublic FileEntity(File file, MetadataService metadataService)
file - The underlying file.metadataService - The metadata service to use.public boolean exists()
Entitypublic List<Entity> getChildren()
EntitygetChildren in class Entitypublic File getFile()
public Entity getParent()
Entitypublic Representation getRepresentation(MediaType defaultMediaType, int timeToLive)
EntitygetRepresentation in class Entitypublic boolean isDirectory()
EntityisDirectory in class Entitypublic boolean isNormal()
EntityisNormal in class EntityFile.isFile(),
File.isDirectory()Copyright © 2005–2025. All rights reserved.