FakeWatcher class

A fake DirectoryWatcher.

Use the static notifyWatchers method to add simulated events.

Implemented types

Constructors

FakeWatcher(String path)

Properties

directory → String
The directory whose contents are being monitored.
read-only, override
events → Stream<WatchEvent>
The broadcast Stream of events that have occurred to the watched file or files in the watched directory. [...]
read-only, override
isReady → bool
Whether the watcher is initialized and watching for changes. [...]
read-only, override
path → String
The path to the file or directory whose contents are being monitored.
final
ready → Future
A Future that completes when the watcher is initialized and watching for changes. [...]
read-only, override
hashCode → int
The hash code for this object.
read-only, inherited
runtimeType → Type
A representation of the runtime type of the object.
read-only, inherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
toString() → String
Returns a string representation of this object.
inherited

Operators

operator ==(dynamic other) → bool
The equality operator.
inherited

Static Properties

watchers → List<FakeWatcher>
All watchers.
final

Static Methods

notifyWatchers(WatchEvent event) → void
Notify all active watchers of event if their FakeWatcher#path matches. The path will also be adjusted to remove the path.