| Index: pkg/analyzer/lib/file_system/memory_file_system.dart
|
| diff --git a/pkg/analyzer/lib/file_system/memory_file_system.dart b/pkg/analyzer/lib/file_system/memory_file_system.dart
|
| index 8d1f1144b732ccb8774f601036047fd91fd8e3ba..d85a224da8aad03c23f9965f05269e79ad956e9f 100644
|
| --- a/pkg/analyzer/lib/file_system/memory_file_system.dart
|
| +++ b/pkg/analyzer/lib/file_system/memory_file_system.dart
|
| @@ -183,6 +183,11 @@ class _MemoryDummyLink extends _MemoryResource implements File {
|
| : super(provider, path);
|
|
|
| @override
|
| + Stream<WatchEvent> get changes {
|
| + throw new FileSystemException(path, "File does not exist");
|
| + }
|
| +
|
| + @override
|
| bool get exists => false;
|
|
|
| int get modificationStamp {
|
| @@ -358,23 +363,6 @@ class _MemoryFolder extends _MemoryResource implements Folder {
|
| : super(provider, path);
|
|
|
| @override
|
| - Stream<WatchEvent> get changes {
|
| - StreamController<WatchEvent> streamController =
|
| - new StreamController<WatchEvent>();
|
| - if (!_provider._pathToWatchers.containsKey(path)) {
|
| - _provider._pathToWatchers[path] = <StreamController<WatchEvent>>[];
|
| - }
|
| - _provider._pathToWatchers[path].add(streamController);
|
| - streamController.done.then((_) {
|
| - _provider._pathToWatchers[path].remove(streamController);
|
| - if (_provider._pathToWatchers[path].isEmpty) {
|
| - _provider._pathToWatchers.remove(path);
|
| - }
|
| - });
|
| - return streamController.stream;
|
| - }
|
| -
|
| - @override
|
| bool get exists => _provider._pathToResource[path] is _MemoryFolder;
|
|
|
| @override
|
| @@ -442,6 +430,22 @@ abstract class _MemoryResource implements Resource {
|
|
|
| _MemoryResource(this._provider, this.path);
|
|
|
| + Stream<WatchEvent> get changes {
|
| + StreamController<WatchEvent> streamController =
|
| + new StreamController<WatchEvent>();
|
| + if (!_provider._pathToWatchers.containsKey(path)) {
|
| + _provider._pathToWatchers[path] = <StreamController<WatchEvent>>[];
|
| + }
|
| + _provider._pathToWatchers[path].add(streamController);
|
| + streamController.done.then((_) {
|
| + _provider._pathToWatchers[path].remove(streamController);
|
| + if (_provider._pathToWatchers[path].isEmpty) {
|
| + _provider._pathToWatchers.remove(path);
|
| + }
|
| + });
|
| + return streamController.stream;
|
| + }
|
| +
|
| @override
|
| get hashCode => path.hashCode;
|
|
|
|
|