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

Unified Diff: pkg/watcher/lib/src/utils.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
« no previous file with comments | « pkg/watcher/lib/src/path_set.dart ('k') | pkg/watcher/test/directory_watcher/mac_os_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/watcher/lib/src/utils.dart
diff --git a/pkg/watcher/lib/src/utils.dart b/pkg/watcher/lib/src/utils.dart
index e4e4457944dc6296890bb202ede4726f55c66fdd..66c0f09cf7b2ea121f9dad780b8a7321d947a076 100644
--- a/pkg/watcher/lib/src/utils.dart
+++ b/pkg/watcher/lib/src/utils.dart
@@ -18,6 +18,10 @@ bool isDirectoryNotFoundException(error) {
return error.osError.errorCode == notFoundCode;
}
+/// Returns the union of all elements in each set in [sets].
+Set unionAll(Iterable<Set> sets) =>
+ sets.fold(new Set(), (union, set) => union.union(set));
+
/// Returns a buffered stream that will emit the same values as the stream
/// returned by [future] once [future] completes.
///
« no previous file with comments | « pkg/watcher/lib/src/path_set.dart ('k') | pkg/watcher/test/directory_watcher/mac_os_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698