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

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

Issue 66163002: Wrap Directory.watch on Mac OS for the watcher package. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: code review Created 7 years, 1 month 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 4484c2b77bf194254f18cd14d4e499b07ef0b097..78b1174e189646560f12414afc615499fb8b99b7 100644
--- a/pkg/watcher/lib/src/directory_watcher.dart
+++ b/pkg/watcher/lib/src/directory_watcher.dart
@@ -9,6 +9,7 @@ import 'dart:io';
import 'watch_event.dart';
import 'directory_watcher/linux.dart';
+import 'directory_watcher/mac_os.dart';
import 'directory_watcher/polling.dart';
/// Watches the contents of a directory and emits [WatchEvent]s when something
@@ -54,6 +55,7 @@ abstract class DirectoryWatcher {
/// watchers.
factory DirectoryWatcher(String directory, {Duration pollingDelay}) {
if (Platform.isLinux) return new LinuxDirectoryWatcher(directory);
+ if (Platform.isMacOS) return new MacOSDirectoryWatcher(directory);
return new PollingDirectoryWatcher(directory, pollingDelay: pollingDelay);
}
}
« no previous file with comments | « pkg/watcher/lib/src/constructable_file_system_event.dart ('k') | pkg/watcher/lib/src/directory_watcher/linux.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698