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

Unified Diff: runtime/bin/file_patch.dart

Issue 19263003: Add FileSystemWatcher class to dart:io. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Simplify watching by removing FileSystemWatcher and adding FileSystemEntity.watch. Created 7 years, 4 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: runtime/bin/file_patch.dart
diff --git a/runtime/bin/file_patch.dart b/runtime/bin/file_patch.dart
index c9e4fccb01e9df906a65981a24a627cb2d68cdd8..a22b2b8ba79cac94e645067fcb1f069876da5d85 100644
--- a/runtime/bin/file_patch.dart
+++ b/runtime/bin/file_patch.dart
@@ -42,6 +42,15 @@ patch class _RandomAccessFile {
/* patch */ static _flush(int id) native "File_Flush";
}
+patch class _FileSystemWatcher {
+ _watchPath(String path, int events, bool recursive)
+ native "FileSystemWatcher_WatchPath";
+ void _unwatchPath(int id) native "FileSystemWatcher_UnwatchPath";
+ int _getSocketId(int id) native "FileSystemWatcher_GetSocketId";
+ List _readEvents(int id)
+ native "FileSystemWatcher_ReadEvents";
+}
+
Uint8List _makeUint8ListView(Uint8List source, int offsetInBytes, int length) {
return new Uint8List.view(source.buffer, offsetInBytes, length);
}

Powered by Google App Engine
This is Rietveld 408576698