org.entityfs
Interface EFile
- All Superinterfaces:
- Comparable<EntityView>, Deletable, Entity, EntityView, Lockable, Named, NamedReadableFile, Observable, RandomlyAccessibleFile, ReadableFile, ReadLockable, ReadWritableFile, ReadWriteLockable, WritableFile, WriteLockable
- All Known Subinterfaces:
- EFileImplementation
- All Known Implementing Classes:
- FileImpl
public interface EFile
- extends Entity, ReadWritableFile, NamedReadableFile
This is an interface for a file implementation. A file supports being read
and written to.
Physical file system-backed file system implementations support the
FCFileBacked
capability. It allows the
client to open FileInputStream
:s and FileOutputStream
:s on
the file, and use it as an RandomAccessFile
.
In addition to the methods defined in this interface, the class
Files
contains static utility methods for working
with files.
A file is Observable
for updates. It can send the following events:
EntityDeletedEvent
— the file was deleted.
EntityModifiedEvent
— the file was modified in a way that
updated its last modification time (see EntityView.getLastModified()
). If a client is writing to a file, this event is only fired when the
client's output stream is closed, not every time that it writes to the file.
EntityRenamedEvent
— the file was renamed and/or moved.
NewEntityEvent
— the file was created. This event can only
be received from a file system observer since it is sent before a client can
register an observer on the file. (Unless the event manager is paused; see
the developer documentation for more on that.)
- Since:
- 1.0
- Author:
- Karl Gustafsson
- See Also:
Entities
,
Files
- In_jar:
- entityfs-core
Methods inherited from interface org.entityfs.EntityView |
canRead, canWrite, copy, copy, copyAttributes, createLock, disconnect, getCapability, getFileSystem, getLastModified, getParent, getType, getViewed, getViewedEntity, isConnected, isRootDirectory, isValid, lock, rename, setLastModified, supportsCapability, touch |