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

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

Issue 98773002: Rewrite file-system-watcher to better handle the different system APIs. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Android impl and doc fix. Created 7 years 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 | « sdk/lib/_internal/lib/io_patch.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 896ef263d3391d452a95f2795f213da3d982d6eb..0a8d230d601bdbc76130ac1965163003c182e31f 100644
--- a/sdk/lib/io/file_system_entity.dart
+++ b/sdk/lib/io/file_system_entity.dart
@@ -370,9 +370,9 @@ abstract class FileSystemEntity {
*/
Stream<FileSystemEvent> watch({int events: FileSystemEvent.ALL,
bool recursive: false})
- => new _FileSystemWatcher(_trimTrailingPathSeparators(path),
- events,
- recursive).stream;
+ => _FileSystemWatcher.watch(_trimTrailingPathSeparators(path),
+ events,
+ recursive);
Future<FileSystemEntity> _delete({bool recursive: false});
void _deleteSync({bool recursive: false});
@@ -741,9 +741,8 @@ class FileSystemMoveEvent extends FileSystemEvent {
}
-abstract class _FileSystemWatcher {
- external factory _FileSystemWatcher(String path, int events, bool recursive);
+class _FileSystemWatcher {
+ external static Stream<FileSystemEvent> watch(
+ String path, int events, bool recursive);
external static bool get isSupported;
-
- Stream<FileSystemEvent> get stream;
}
« no previous file with comments | « sdk/lib/_internal/lib/io_patch.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698