| 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 import 'dart:async'; | 5 import 'dart:async'; |
| 6 import 'dart:convert'; | 6 import 'dart:convert'; |
| 7 import 'dart:typed_data'; | 7 import 'dart:typed_data'; |
| 8 | 8 |
| 9 import 'package:convert/convert.dart'; | 9 import 'package:convert/convert.dart'; |
| 10 import 'package:crypto/crypto.dart'; | 10 import 'package:crypto/crypto.dart'; |
| (...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 429 final Uri uri; | 429 final Uri uri; |
| 430 | 430 |
| 431 final FileState file; | 431 final FileState file; |
| 432 | 432 |
| 433 _FileSystemViewEntry(this.uri, this.file); | 433 _FileSystemViewEntry(this.uri, this.file); |
| 434 | 434 |
| 435 @override | 435 @override |
| 436 Future<bool> exists() async => _shouldNotBeQueried(); | 436 Future<bool> exists() async => _shouldNotBeQueried(); |
| 437 | 437 |
| 438 @override | 438 @override |
| 439 Future<DateTime> lastModified() async => _shouldNotBeQueried(); | |
| 440 | |
| 441 @override | |
| 442 Future<List<int>> readAsBytes() async { | 439 Future<List<int>> readAsBytes() async { |
| 443 if (file == null) { | 440 if (file == null) { |
| 444 throw new FileSystemException(uri, 'File $uri does not exist.'); | 441 throw new FileSystemException(uri, 'File $uri does not exist.'); |
| 445 } | 442 } |
| 446 return file.content; | 443 return file.content; |
| 447 } | 444 } |
| 448 | 445 |
| 449 @override | 446 @override |
| 450 Future<String> readAsString() async => _shouldNotBeQueried(); | 447 Future<String> readAsString() async => _shouldNotBeQueried(); |
| 451 | 448 |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 514 cycle.libraries.add(node.file); | 511 cycle.libraries.add(node.file); |
| 515 fileToCycleMap[node.file] = cycle; | 512 fileToCycleMap[node.file] = cycle; |
| 516 } | 513 } |
| 517 topologicallySortedCycles.add(cycle); | 514 topologicallySortedCycles.add(cycle); |
| 518 } | 515 } |
| 519 | 516 |
| 520 _LibraryNode getNode(FileState file) { | 517 _LibraryNode getNode(FileState file) { |
| 521 return nodesOfFiles.putIfAbsent(file, () => new _LibraryNode(this, file)); | 518 return nodesOfFiles.putIfAbsent(file, () => new _LibraryNode(this, file)); |
| 522 } | 519 } |
| 523 } | 520 } |
| OLD | NEW |