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

Unified Diff: sdk/lib/io/file_system_entity.dart

Issue 23483030: Make file system watcher compile on Mac OS 106, and add a runtime-call to test if the system suppor… (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 3 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: sdk/lib/io/file_system_entity.dart
diff --git a/sdk/lib/io/file_system_entity.dart b/sdk/lib/io/file_system_entity.dart
index 8d86fe8f5d0f06b47fa57023ae309b32ffe06e37..ee088cc7ce7ee6a4dee91827802ac92cbeed2832 100644
--- a/sdk/lib/io/file_system_entity.dart
+++ b/sdk/lib/io/file_system_entity.dart
@@ -344,6 +344,13 @@ abstract class FileSystemEntity {
events,
recursive).stream;
+ /**
+ * Test if [watch] is supported on the current system.
+ *
+ * Mac OS 10.6 and below is not supported.
+ */
+ static bool get isWatchSupported => _FileSystemWatcher.isSupported;
+
/**
* Finds the type of file system object that a path points to. Returns
@@ -537,6 +544,7 @@ class FileSystemMoveEvent extends FileSystemEvent {
abstract class _FileSystemWatcher {
external factory _FileSystemWatcher(String path, int events, bool recursive);
+ external static bool get isSupported;
Stream<FileSystemEvent> get stream;
}

Powered by Google App Engine
This is Rietveld 408576698