| 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 memory_file_system; | 5 library memory_file_system; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 import 'dart:collection'; | 8 import 'dart:collection'; |
| 9 | 9 |
| 10 import 'package:analyzer/src/generated/engine.dart' show TimestampedData; | 10 import 'package:analyzer/src/generated/engine.dart' show TimestampedData; |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 205 @override | 205 @override |
| 206 bool isOrContains(String path) { | 206 bool isOrContains(String path) { |
| 207 return path == this.path; | 207 return path == this.path; |
| 208 } | 208 } |
| 209 } | 209 } |
| 210 | 210 |
| 211 | 211 |
| 212 /** | 212 /** |
| 213 * An in-memory implementation of [Source]. | 213 * An in-memory implementation of [Source]. |
| 214 */ | 214 */ |
| 215 class _MemoryFileSource implements Source { | 215 class _MemoryFileSource extends AbstractSource { |
| 216 final _MemoryFile _file; | 216 final _MemoryFile _file; |
| 217 | 217 |
| 218 final Uri uri; | 218 final Uri uri; |
| 219 | 219 |
| 220 _MemoryFileSource(this._file, this.uri); | 220 _MemoryFileSource(this._file, this.uri); |
| 221 | 221 |
| 222 @override | 222 @override |
| 223 TimestampedData<String> get contents { | 223 TimestampedData<String> get contents { |
| 224 return new TimestampedData<String>(modificationStamp, _file._content); | 224 return new TimestampedData<String>(modificationStamp, _file._content); |
| 225 } | 225 } |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 376 bool operator ==(other) { | 376 bool operator ==(other) { |
| 377 if (runtimeType != other.runtimeType) { | 377 if (runtimeType != other.runtimeType) { |
| 378 return false; | 378 return false; |
| 379 } | 379 } |
| 380 return path == other.path; | 380 return path == other.path; |
| 381 } | 381 } |
| 382 | 382 |
| 383 @override | 383 @override |
| 384 String toString() => path; | 384 String toString() => path; |
| 385 } | 385 } |
| OLD | NEW |