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 /// A file system that implements [CopilerOptions.multiRoots]. | 5 /// A file system that implements [CopilerOptions.multiRoots]. |
6 library front_end.src.multi_roots_file_system; | 6 library front_end.src.multi_roots_file_system; |
7 | 7 |
8 import 'dart:async'; | 8 import 'dart:async'; |
9 | 9 |
10 import 'package:front_end/file_system.dart'; | 10 import 'package:front_end/file_system.dart'; |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 } | 66 } |
67 return multiRootFileSystem.original.entityForUri(uri); | 67 return multiRootFileSystem.original.entityForUri(uri); |
68 } | 68 } |
69 | 69 |
70 MultiRootFileSystemEntity(this.multiRootFileSystem, this.uri); | 70 MultiRootFileSystemEntity(this.multiRootFileSystem, this.uri); |
71 | 71 |
72 @override | 72 @override |
73 Future<bool> exists() async => (await delegate).exists(); | 73 Future<bool> exists() async => (await delegate).exists(); |
74 | 74 |
75 @override | 75 @override |
76 Future<DateTime> lastModified() async => (await delegate).lastModified(); | |
77 | |
78 @override | |
79 Future<List<int>> readAsBytes() async => (await delegate).readAsBytes(); | 76 Future<List<int>> readAsBytes() async => (await delegate).readAsBytes(); |
80 | 77 |
81 @override | 78 @override |
82 Future<String> readAsString() async => (await delegate).readAsString(); | 79 Future<String> readAsString() async => (await delegate).readAsString(); |
83 } | 80 } |
84 | 81 |
85 _normalize(Uri uri) => | 82 _normalize(Uri uri) => |
86 uri.path.endsWith('/') ? uri : uri.replace(path: '${uri.path}/'); | 83 uri.path.endsWith('/') ? uri : uri.replace(path: '${uri.path}/'); |
OLD | NEW |