AffogatoVFSAPI class

Inheritance

Constructors

AffogatoVFSAPI()

Properties

api AffogatoAPI
latefinalinherited
documentChangedStream Stream<VFSDocumentChangedEvent>
final
documentRequestChangeStream Stream<VFSDocumentRequestChangeEvent>
final
hashCode int
The hash code for this object.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
structureChangedStream Stream<VFSStructureChangedEvent>
final

Methods

accessEntity<T>(String id, {bool? isDir, void stepCallback(AffogatoVFSEntity)?, void action(AffogatoVFSEntity?)?}) AffogatoVFSEntity?
This gets ahold of an entity in the VFS, so that actions can be performed on it. If the type of the entity is known in advance, then passing isDir accordingly will help filter results faster. The stepCallback, if specified, will be called on each item that is accessed during the recursive search process, and the supplied AffogatoVFSEntity argument will be the current item of the search. This is useful for performing side actions during search, such as collecing the paths of parent entities. However, this method stops once the target entity is found. To exhaustively iterate over all subdirs and files, use traverseBFS instead.
createEntity(AffogatoVFSEntity entity, {String? dirId}) bool
The method caller is responsible for ensuring that the AffogatoVFSEntity.entityId field of the provided entity does not have any collisions. This method checks to ensure that there are no conflicting names of files/directories in the specified location, dir, before inserting the entity.
deleteEntity(String entityId) bool
documentRequestChange(VFSDocumentRequestChangeEvent event) → void
Applies the specified changes to the specified document in event.
dumpTree() String
init() → void
override
moveEntity({required String entityId, required String newDirId}) bool
A similar implementation to deleteEntity, except that the entity cache is not updated and the directory specified by newDirId gets updated to contain the entity specified by entityId.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pathToEntity(String id) String?
toString() String
A string representation of this object.
inherited
traverseBFS(void stepCallback(AffogatoVFSEntity), {String? startDirId}) bool
updateFile(String id, String newContent) bool

Operators

operator ==(Object other) bool
The equality operator.
override