| 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 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 */ | 148 */ |
| 149 String get path; | 149 String get path; |
| 150 | 150 |
| 151 /** | 151 /** |
| 152 * Return a short version of the name that can be displayed to the user to | 152 * Return a short version of the name that can be displayed to the user to |
| 153 * denote this resource. | 153 * denote this resource. |
| 154 */ | 154 */ |
| 155 String get shortName; | 155 String get shortName; |
| 156 | 156 |
| 157 /** | 157 /** |
| 158 * Synchronously deletes this resource and its children. |
| 159 * |
| 160 * Throws an exception if the resource cannot be deleted. |
| 161 */ |
| 162 void delete(); |
| 163 |
| 164 /** |
| 158 * Return `true` if absolute [path] references this resource or a resource in | 165 * Return `true` if absolute [path] references this resource or a resource in |
| 159 * this folder. | 166 * this folder. |
| 160 */ | 167 */ |
| 161 bool isOrContains(String path); | 168 bool isOrContains(String path); |
| 162 } | 169 } |
| 163 | 170 |
| 164 /** | 171 /** |
| 165 * Instances of the class [ResourceProvider] convert [String] paths into | 172 * Instances of the class [ResourceProvider] convert [String] paths into |
| 166 * [Resource]s. | 173 * [Resource]s. |
| 167 */ | 174 */ |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 | 240 |
| 234 @override | 241 @override |
| 235 Uri restoreAbsolute(Source source) => | 242 Uri restoreAbsolute(Source source) => |
| 236 _provider.pathContext.toUri(source.fullName); | 243 _provider.pathContext.toUri(source.fullName); |
| 237 | 244 |
| 238 /** | 245 /** |
| 239 * Return `true` if the given [uri] is a `file` URI. | 246 * Return `true` if the given [uri] is a `file` URI. |
| 240 */ | 247 */ |
| 241 static bool _isFileUri(Uri uri) => uri.scheme == _FILE_SCHEME; | 248 static bool _isFileUri(Uri uri) => uri.scheme == _FILE_SCHEME; |
| 242 } | 249 } |
| OLD | NEW |