| 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 file_system; | 5 library 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:path/path.dart'; | 10 import 'package:path/path.dart'; |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 /** | 79 /** |
| 80 * Return the full path to this resource. | 80 * Return the full path to this resource. |
| 81 */ | 81 */ |
| 82 String get path; | 82 String get path; |
| 83 | 83 |
| 84 /** | 84 /** |
| 85 * Return a short version of the name that can be displayed to the user to | 85 * Return a short version of the name that can be displayed to the user to |
| 86 * denote this resource. | 86 * denote this resource. |
| 87 */ | 87 */ |
| 88 String get shortName; | 88 String get shortName; |
| 89 |
| 90 /** |
| 91 * Return `true` if absolute [path] references this resource or a resource in |
| 92 * this folder. |
| 93 */ |
| 94 bool isOrContains(String path); |
| 89 } | 95 } |
| 90 | 96 |
| 91 | 97 |
| 92 /** | 98 /** |
| 93 * Instances of the class [ResourceProvider] convert [String] paths into | 99 * Instances of the class [ResourceProvider] convert [String] paths into |
| 94 * [Resource]s. | 100 * [Resource]s. |
| 95 */ | 101 */ |
| 96 abstract class ResourceProvider { | 102 abstract class ResourceProvider { |
| 97 /** | 103 /** |
| 98 * Get the path context used by this resource provider. | 104 * Get the path context used by this resource provider. |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 } | 138 } |
| 133 | 139 |
| 134 /** | 140 /** |
| 135 * Return `true` if the given URI is a `file` URI. | 141 * Return `true` if the given URI is a `file` URI. |
| 136 * | 142 * |
| 137 * @param uri the URI being tested | 143 * @param uri the URI being tested |
| 138 * @return `true` if the given URI is a `file` URI | 144 * @return `true` if the given URI is a `file` URI |
| 139 */ | 145 */ |
| 140 static bool _isFileUri(Uri uri) => uri.scheme == _FILE_SCHEME; | 146 static bool _isFileUri(Uri uri) => uri.scheme == _FILE_SCHEME; |
| 141 } | 147 } |
| OLD | NEW |