| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 library analyzer.file_system.memory_file_system; | 5 library analyzer.file_system.memory_file_system; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 import 'dart:collection'; | 8 import 'dart:collection'; |
| 9 import 'dart:core' hide Resource; | 9 import 'dart:core' hide Resource; |
| 10 | 10 |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 _notifyWatchers(path, ChangeType.REMOVE); | 73 _notifyWatchers(path, ChangeType.REMOVE); |
| 74 } | 74 } |
| 75 | 75 |
| 76 @override | 76 @override |
| 77 File getFile(String path) => new _MemoryFile(this, path); | 77 File getFile(String path) => new _MemoryFile(this, path); |
| 78 | 78 |
| 79 @override | 79 @override |
| 80 Folder getFolder(String path) => newFolder(path); | 80 Folder getFolder(String path) => newFolder(path); |
| 81 | 81 |
| 82 @override | 82 @override |
| 83 Future<List<int>> getModificationTimes(List<Source> sources) async { |
| 84 return sources.map((source) { |
| 85 String path = source.fullName; |
| 86 return _pathToTimestamp[path] ?? -1; |
| 87 }).toList(); |
| 88 } |
| 89 |
| 90 @override |
| 83 Resource getResource(String path) { | 91 Resource getResource(String path) { |
| 84 path = pathContext.normalize(path); | 92 path = pathContext.normalize(path); |
| 85 Resource resource = _pathToResource[path]; | 93 Resource resource = _pathToResource[path]; |
| 86 if (resource == null) { | 94 if (resource == null) { |
| 87 resource = new _MemoryFile(this, path); | 95 resource = new _MemoryFile(this, path); |
| 88 } | 96 } |
| 89 return resource; | 97 return resource; |
| 90 } | 98 } |
| 91 | 99 |
| 92 @override | 100 @override |
| (...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 600 bool operator ==(other) { | 608 bool operator ==(other) { |
| 601 if (runtimeType != other.runtimeType) { | 609 if (runtimeType != other.runtimeType) { |
| 602 return false; | 610 return false; |
| 603 } | 611 } |
| 604 return path == other.path; | 612 return path == other.path; |
| 605 } | 613 } |
| 606 | 614 |
| 607 @override | 615 @override |
| 608 String toString() => path; | 616 String toString() => path; |
| 609 } | 617 } |
| OLD | NEW |