PhysicalFilesWatcher constructor
PhysicalFilesWatcher(})
Creates a new PhysicalFilesWatcher for the specified root directory.
root - The root directory to watch
useEventBasedWatcher - If true, uses event-based file watching.
If false, uses polling.
pollingInterval - The interval at which to poll for changes.
Implementation
PhysicalFilesWatcher(
String root,
bool useEventBasedWatcher, {
Duration pollingInterval = const Duration(seconds: 4),
}) : _root = root,
_usePolling = !useEventBasedWatcher,
_pollingInterval = pollingInterval {
if (useEventBasedWatcher) {
_initializeEventWatcher();
}
}