| 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 // This code was auto-generated, is not intended to be edited, and is subject to | 5 // This code was auto-generated, is not intended to be edited, and is subject to |
| 6 // significant change. Please see the README file for more information. | 6 // significant change. Please see the README file for more information. |
| 7 | 7 |
| 8 library engine.source.io; | 8 library engine.source.io; |
| 9 | 9 |
| 10 import 'dart:collection'; | 10 import 'dart:collection'; |
| (...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 276 static String FILE_SCHEME = "file"; | 276 static String FILE_SCHEME = "file"; |
| 277 | 277 |
| 278 @override | 278 @override |
| 279 Source resolveAbsolute(Uri uri) { | 279 Source resolveAbsolute(Uri uri) { |
| 280 if (!isFileUri(uri)) { | 280 if (!isFileUri(uri)) { |
| 281 return null; | 281 return null; |
| 282 } | 282 } |
| 283 return new FileBasedSource(new JavaFile.fromUri(uri), uri); | 283 return new FileBasedSource(new JavaFile.fromUri(uri), uri); |
| 284 } | 284 } |
| 285 | 285 |
| 286 @override |
| 287 Uri restoreAbsolute(Source source) { |
| 288 if (source is FileBasedSource) { |
| 289 return new Uri.file(source.fullName); |
| 290 } |
| 291 return null; |
| 292 } |
| 293 |
| 286 /** | 294 /** |
| 287 * Return `true` if the given URI is a `file` URI. | 295 * Return `true` if the given URI is a `file` URI. |
| 288 * | 296 * |
| 289 * @param uri the URI being tested | 297 * @param uri the URI being tested |
| 290 * @return `true` if the given URI is a `file` URI | 298 * @return `true` if the given URI is a `file` URI |
| 291 */ | 299 */ |
| 292 static bool isFileUri(Uri uri) => uri.scheme == FILE_SCHEME; | 300 static bool isFileUri(Uri uri) => uri.scheme == FILE_SCHEME; |
| 293 } | 301 } |
| 294 | 302 |
| 295 /** | 303 /** |
| (...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 545 } | 553 } |
| 546 | 554 |
| 547 /** | 555 /** |
| 548 * Return `true` if the given URI is a `file` URI. | 556 * Return `true` if the given URI is a `file` URI. |
| 549 * | 557 * |
| 550 * @param uri the URI being tested | 558 * @param uri the URI being tested |
| 551 * @return `true` if the given URI is a `file` URI | 559 * @return `true` if the given URI is a `file` URI |
| 552 */ | 560 */ |
| 553 static bool isFileUri(Uri uri) => uri.scheme == FILE_SCHEME; | 561 static bool isFileUri(Uri uri) => uri.scheme == FILE_SCHEME; |
| 554 } | 562 } |
| OLD | NEW |