public interface File extends DirectoryEntry
File represents a file in a file system.
| Modifier and Type | Method and Description |
|---|---|
FileRecord |
getFileRecord(Type fileRecordType)
Gets the file record corresponding to the given
File
record Type. |
long |
getSize()
Gets the size of this file in bytes if
hasSize() is
true. |
boolean |
hasSize()
Tests if this file has a known size.
|
getCreatedTime, getLastAccessTime, getLastModifiedTime, getName, getOwner, getOwnerId, getPath, getRealPath, isAliasgetDescription, getDisplayName, getGenusType, isOfGenusTypegetId, isCurrentgetRecordTypes, hasRecordTypegetProperties, getPropertiesByRecordTypeboolean hasSize()
true if this file has a size, false
otherwisemandatory - This method must be implemented. long getSize()
hasSize() is
true. IllegalStateException - hasSize() is
false mandatory - This method must be implemented. FileRecord getFileRecord(Type fileRecordType) throws OperationFailedException
File
record Type. This method is used to retrieve an object
implementing the requested record. The fileRecordType
may be the Type returned in getRecordTypes()
or any of its parents in a Type hierarchy where
hasRecordType(fileRecordType) is true .fileRecordType - the file record typeNullArgumentException - fileRecordType
is null OperationFailedException - unable to complete requestUnsupportedException -
hasRecordType(fileRecordType) is false mandatory - This method must be implemented.