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. |
/// |