| 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 efb779ccd12447ce6b20ac32cd054bf7686a8193..6473875b7b85fafa37c4de1b840e94ef40ed2a78 100644
|
| --- a/pkg/analyzer/lib/file_system/memory_file_system.dart
|
| +++ b/pkg/analyzer/lib/file_system/memory_file_system.dart
|
| @@ -174,6 +174,9 @@ class _MemoryFile extends _MemoryResource implements File {
|
| _MemoryFile(MemoryResourceProvider provider, String path)
|
| : super(provider, path);
|
|
|
| + @override
|
| + bool get exists => _provider._pathToResource[path] is _MemoryFile;
|
| +
|
| int get modificationStamp {
|
| int stamp = _provider._pathToTimestamp[path];
|
| if (stamp == null) {
|
| @@ -286,6 +289,7 @@ class _MemoryFileSource extends Source {
|
| class _MemoryFolder extends _MemoryResource implements Folder {
|
| _MemoryFolder(MemoryResourceProvider provider, String path)
|
| : super(provider, path);
|
| +
|
| @override
|
| Stream<WatchEvent> get changes {
|
| StreamController<WatchEvent> streamController =
|
| @@ -304,6 +308,9 @@ class _MemoryFolder extends _MemoryResource implements Folder {
|
| }
|
|
|
| @override
|
| + bool get exists => _provider._pathToResource[path] is _MemoryFolder;
|
| +
|
| + @override
|
| String canonicalizePath(String relPath) {
|
| relPath = posix.normalize(relPath);
|
| String childPath = posix.join(path, relPath);
|
| @@ -327,6 +334,16 @@ class _MemoryFolder extends _MemoryResource implements Folder {
|
| }
|
|
|
| @override
|
| + _MemoryFolder getChildAssumingFolder(String relPath) {
|
| + String childPath = canonicalizePath(relPath);
|
| + _MemoryResource resource = _provider._pathToResource[childPath];
|
| + if (resource is _MemoryFolder) {
|
| + return resource;
|
| + }
|
| + return new _MemoryFolder(_provider, childPath);
|
| + }
|
| +
|
| + @override
|
| List<Resource> getChildren() {
|
| List<Resource> children = <Resource>[];
|
| _provider._pathToResource.forEach((resourcePath, resource) {
|
| @@ -357,9 +374,6 @@ abstract class _MemoryResource implements Resource {
|
| _MemoryResource(this._provider, this.path);
|
|
|
| @override
|
| - bool get exists => _provider._pathToResource.containsKey(path);
|
| -
|
| - @override
|
| get hashCode => path.hashCode;
|
|
|
| @override
|
|
|