| 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 * Synchronously rename this file. | 47 * Synchronously rename this file. |
| 48 * Return a [File] instance for the renamed file. | 48 * Return a [File] instance for the renamed file. |
| 49 * | 49 * |
| 50 * If [newPath] identifies an existing file, that file is replaced. | 50 * If [newPath] identifies an existing file, that file is replaced. |
| 51 * If [newPath] identifies an existing resource the operation might fail and | 51 * If [newPath] identifies an existing resource the operation might fail and |
| 52 * an exception is thrown. | 52 * an exception is thrown. |
| 53 */ | 53 */ |
| 54 File renameSync(String newPath); | 54 File renameSync(String newPath); |
| 55 | 55 |
| 56 /** | 56 /** |
| 57 * Return a file that refers to the same file as this file, but whose path |
| 58 * does not contain any symbolic links. |
| 59 */ |
| 60 File resolveSymbolicLinksSync(); |
| 61 |
| 62 /** |
| 57 * Synchronously write the given [bytes] to the file. The new content will | 63 * Synchronously write the given [bytes] to the file. The new content will |
| 58 * replace any existing content. | 64 * replace any existing content. |
| 59 * | 65 * |
| 60 * Throws a [FileSystemException] if the operation fails. | 66 * Throws a [FileSystemException] if the operation fails. |
| 61 */ | 67 */ |
| 62 void writeAsBytesSync(List<int> bytes); | 68 void writeAsBytesSync(List<int> bytes); |
| 63 | 69 |
| 64 /** | 70 /** |
| 65 * Synchronously write the given [content] to the file. The new content will | 71 * Synchronously write the given [content] to the file. The new content will |
| 66 * replace any existing content. | 72 * replace any existing content. |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 264 | 270 |
| 265 @override | 271 @override |
| 266 Uri restoreAbsolute(Source source) => | 272 Uri restoreAbsolute(Source source) => |
| 267 _provider.pathContext.toUri(source.fullName); | 273 _provider.pathContext.toUri(source.fullName); |
| 268 | 274 |
| 269 /** | 275 /** |
| 270 * Return `true` if the given [uri] is a `file` URI. | 276 * Return `true` if the given [uri] is a `file` URI. |
| 271 */ | 277 */ |
| 272 static bool isFileUri(Uri uri) => uri.scheme == FILE_SCHEME; | 278 static bool isFileUri(Uri uri) => uri.scheme == FILE_SCHEME; |
| 273 } | 279 } |
| OLD | NEW |