ReloadFileWatcher class final

Watches one or more filesystem roots and forwards changes into a ReloadController.

This is intended for local development loops. It debounces noisy editor or build-tool bursts and can either request a subtree rebuild (reload) or a full remount (restart).

Properties

controller ReloadController
The target controller that receives debounced reload signals.
final
debounce Duration
Debounce duration applied across all watched roots.
final
hashCode int
The hash code for this object.
no setterinherited
ignoreHidden bool
Whether dotfiles and dot-directories are ignored.
final
mode ReloadMode
Requested mode when a matching change arrives.
final
pendingPaths List<String>
Most recent paths coalesced into the current debounce window.
no setter
recursive bool
Whether subdirectories are watched recursively.
final
roots List<String>
Absolute filesystem roots being watched.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

dispose() Future<void>
Stops watching and cancels any pending debounce timer.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

watch({required ReloadController controller, required Iterable<String> roots, ReloadMode mode = ReloadMode.reload, Duration debounce = const Duration(milliseconds: 150), bool recursive = true, bool ignoreHidden = true, Iterable<String> extensions = const <String>[]}) Future<ReloadFileWatcher>
Creates and starts a filesystem-backed watcher.