FileWatcherService class

File watcher service — watches files and directories for changes.

Constructors

FileWatcherService({Duration debounceDelay = const Duration(milliseconds: 300)})

Properties

activeWatches int
Active watch count.
no setter
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
watchedPaths List<String>
All watched paths.
no setter

Methods

dispose() → void
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
unwatch(String id) Future<void>
Cancel a specific watch.
unwatchAll() Future<void>
Cancel all watches.
watchConfig(String configPath, void callback(FileChange)) Future<String?>
Watch for config file changes (~/.neomage/settings.json, etc.).
watchDirectory(String dirPath, void callback(FileChange), {bool recursive = true, List<String> extensions = const [], List<String> ignorePatterns = const []}) Future<String?>
Watch a directory for changes.
watchFile(String filePath, void callback(FileChange)) Future<String?>
Watch a file for changes.
watchKeybindings(String keybindingsPath, void callback(FileChange)) Future<String?>
Watch for keybinding file changes.

Operators

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