| OLD | NEW |
| 1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2017, 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.test.src.summary.resynthesize_kernel_test; | 5 library analyzer.test.src.summary.resynthesize_kernel_test; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 | 8 |
| 9 import 'package:analyzer/dart/ast/ast.dart'; | 9 import 'package:analyzer/dart/ast/ast.dart'; |
| 10 import 'package:analyzer/dart/ast/standard_ast_factory.dart'; | 10 import 'package:analyzer/dart/ast/standard_ast_factory.dart'; |
| (...skipping 2204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2215 final File file; | 2215 final File file; |
| 2216 | 2216 |
| 2217 _FileSystemEntityAdaptor(this.uri, this.file); | 2217 _FileSystemEntityAdaptor(this.uri, this.file); |
| 2218 | 2218 |
| 2219 @override | 2219 @override |
| 2220 Future<bool> exists() async { | 2220 Future<bool> exists() async { |
| 2221 return file.exists; | 2221 return file.exists; |
| 2222 } | 2222 } |
| 2223 | 2223 |
| 2224 @override | 2224 @override |
| 2225 Future<DateTime> lastModified() async { | |
| 2226 return new DateTime.fromMicrosecondsSinceEpoch(file.modificationStamp); | |
| 2227 } | |
| 2228 | |
| 2229 @override | |
| 2230 Future<List<int>> readAsBytes() async { | 2225 Future<List<int>> readAsBytes() async { |
| 2231 return file.readAsBytesSync(); | 2226 return file.readAsBytesSync(); |
| 2232 } | 2227 } |
| 2233 | 2228 |
| 2234 @override | 2229 @override |
| 2235 Future<String> readAsString() async { | 2230 Future<String> readAsString() async { |
| 2236 return file.readAsStringSync(); | 2231 return file.readAsStringSync(); |
| 2237 } | 2232 } |
| 2238 } | 2233 } |
| 2239 | 2234 |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2384 } | 2379 } |
| 2385 | 2380 |
| 2386 /** | 2381 /** |
| 2387 * Get the [Source] object for the given [uri]. | 2382 * Get the [Source] object for the given [uri]. |
| 2388 */ | 2383 */ |
| 2389 Source _getSource(String uri) { | 2384 Source _getSource(String uri) { |
| 2390 return _sources.putIfAbsent( | 2385 return _sources.putIfAbsent( |
| 2391 uri, () => _analysisContext.sourceFactory.forUri(uri)); | 2386 uri, () => _analysisContext.sourceFactory.forUri(uri)); |
| 2392 } | 2387 } |
| 2393 } | 2388 } |
| OLD | NEW |