Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(455)

Side by Side Diff: pkg/analyzer/lib/file_system/file_system.dart

Issue 2286923002: Convert analysis server over to use ContextBuilder (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: address comment, fix bugs, clean-up Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 /**
63 * Synchronously write the given [bytes] to the file. The new content will 57 * Synchronously write the given [bytes] to the file. The new content will
64 * replace any existing content. 58 * replace any existing content.
65 * 59 *
66 * Throws a [FileSystemException] if the operation fails. 60 * Throws a [FileSystemException] if the operation fails.
67 */ 61 */
68 void writeAsBytesSync(List<int> bytes); 62 void writeAsBytesSync(List<int> bytes);
69 63
70 /** 64 /**
71 * Synchronously write the given [content] to the file. The new content will 65 * Synchronously write the given [content] to the file. The new content will
72 * replace any existing content. 66 * replace any existing content.
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 */ 170 */
177 void delete(); 171 void delete();
178 172
179 /** 173 /**
180 * Return `true` if absolute [path] references this resource or a resource in 174 * Return `true` if absolute [path] references this resource or a resource in
181 * this folder. 175 * this folder.
182 */ 176 */
183 bool isOrContains(String path); 177 bool isOrContains(String path);
184 178
185 /** 179 /**
180 * Return a resource that refers to the same resource as this resource, but
181 * whose path does not contain any symbolic links.
182 */
183 Resource resolveSymbolicLinksSync();
184
185 /**
186 * Return a Uri representing this resource. 186 * Return a Uri representing this resource.
187 */ 187 */
188 Uri toUri(); 188 Uri toUri();
189 } 189 }
190 190
191 /** 191 /**
192 * Instances of the class [ResourceProvider] convert [String] paths into 192 * Instances of the class [ResourceProvider] convert [String] paths into
193 * [Resource]s. 193 * [Resource]s.
194 */ 194 */
195 abstract class ResourceProvider { 195 abstract class ResourceProvider {
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 270
271 @override 271 @override
272 Uri restoreAbsolute(Source source) => 272 Uri restoreAbsolute(Source source) =>
273 _provider.pathContext.toUri(source.fullName); 273 _provider.pathContext.toUri(source.fullName);
274 274
275 /** 275 /**
276 * Return `true` if the given [uri] is a `file` URI. 276 * Return `true` if the given [uri] is a `file` URI.
277 */ 277 */
278 static bool isFileUri(Uri uri) => uri.scheme == FILE_SCHEME; 278 static bool isFileUri(Uri uri) => uri.scheme == FILE_SCHEME;
279 } 279 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/test/search/type_hierarchy_test.dart ('k') | pkg/analyzer/lib/file_system/memory_file_system.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698