Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(127)

Unified Diff: pkg/watcher/lib/src/directory_watcher.dart

Issue 312743002: Use 'Directory.watch' on Windows in pkg/watcher, instead of pooling. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fixes Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: pkg/watcher/lib/src/directory_watcher.dart
diff --git a/pkg/watcher/lib/src/directory_watcher.dart b/pkg/watcher/lib/src/directory_watcher.dart
index 78b1174e189646560f12414afc615499fb8b99b7..27dbb3f5101f56e5bcb8fa08f5b2d4a177362676 100644
--- a/pkg/watcher/lib/src/directory_watcher.dart
+++ b/pkg/watcher/lib/src/directory_watcher.dart
@@ -10,6 +10,7 @@ import 'dart:io';
import 'watch_event.dart';
import 'directory_watcher/linux.dart';
import 'directory_watcher/mac_os.dart';
+import 'directory_watcher/windows.dart';
import 'directory_watcher/polling.dart';
/// Watches the contents of a directory and emits [WatchEvent]s when something
@@ -56,6 +57,7 @@ abstract class DirectoryWatcher {
factory DirectoryWatcher(String directory, {Duration pollingDelay}) {
if (Platform.isLinux) return new LinuxDirectoryWatcher(directory);
if (Platform.isMacOS) return new MacOSDirectoryWatcher(directory);
+ if (Platform.isWindows) return new WindowsDirectoryWatcher(directory);
return new PollingDirectoryWatcher(directory, pollingDelay: pollingDelay);
}
}

Powered by Google App Engine
This is Rietveld 408576698