| 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.file_system; | 5 library analyzer.file_system.file_system; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 | 8 |
| 9 import 'package:analyzer/src/generated/source.dart'; | 9 import 'package:analyzer/src/generated/source.dart'; |
| 10 import 'package:analyzer/src/util/absolute_path.dart'; | 10 import 'package:analyzer/src/util/absolute_path.dart'; |
| (...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 if (resource is File) { | 235 if (resource is File) { |
| 236 return resource.createSource(actualUri ?? uri); | 236 return resource.createSource(actualUri ?? uri); |
| 237 } | 237 } |
| 238 return null; | 238 return null; |
| 239 } | 239 } |
| 240 | 240 |
| 241 @override | 241 @override |
| 242 Uri restoreAbsolute(Source source) => | 242 Uri restoreAbsolute(Source source) => |
| 243 _provider.pathContext.toUri(source.fullName); | 243 _provider.pathContext.toUri(source.fullName); |
| 244 | 244 |
| 245 ResourceProvider get provider => _provider; |
| 246 |
| 245 /** | 247 /** |
| 246 * Return `true` if the given [uri] is a `file` URI. | 248 * Return `true` if the given [uri] is a `file` URI. |
| 247 */ | 249 */ |
| 248 static bool isFileUri(Uri uri) => uri.scheme == FILE_SCHEME; | 250 static bool isFileUri(Uri uri) => uri.scheme == FILE_SCHEME; |
| 249 } | 251 } |
| OLD | NEW |