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

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

Issue 1228493003: Revert "Package map source factory support" [TBR]. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 5 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
« no previous file with comments | « no previous file | pkg/analyzer/lib/file_system/memory_file_system.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 * Instances of the class [ResourceProvider] convert [String] paths into 132 * Instances of the class [ResourceProvider] convert [String] paths into
133 * [Resource]s. 133 * [Resource]s.
134 */ 134 */
135 abstract class ResourceProvider { 135 abstract class ResourceProvider {
136 /** 136 /**
137 * Get the path context used by this resource provider. 137 * Get the path context used by this resource provider.
138 */ 138 */
139 Context get pathContext; 139 Context get pathContext;
140 140
141 /** 141 /**
142 * Return a [File] that corresponds to the given [path].
143 *
144 * A file may or may not exist at this location.
145 */
146 File getFile(String path);
147
148 /**
149 * Return a [Folder] that corresponds to the given [path].
150 *
151 * A folder may or may not exist at this location.
152 */
153 Folder getFolder(String path);
154
155 /**
156 * Return the [Resource] that corresponds to the given [path]. 142 * Return the [Resource] that corresponds to the given [path].
157 */ 143 */
158 Resource getResource(String path); 144 Resource getResource(String path);
159 145
160 /** 146 /**
161 * Return the folder in which the plugin with the given [pluginId] can store 147 * Return the folder in which the plugin with the given [pluginId] can store
162 * state that will persist across sessions. The folder returned for a given id 148 * state that will persist across sessions. The folder returned for a given id
163 * will not be returned for a different id, ensuring that plugins do not need 149 * will not be returned for a different id, ensuring that plugins do not need
164 * to be concerned with file name collisions with other plugins, assuming that 150 * to be concerned with file name collisions with other plugins, assuming that
165 * the plugin ids are unique. The plugin ids must be valid folder names. 151 * the plugin ids are unique. The plugin ids must be valid folder names.
(...skipping 28 matching lines...) Expand all
194 } 180 }
195 181
196 @override 182 @override
197 Uri restoreAbsolute(Source source) => source.uri; 183 Uri restoreAbsolute(Source source) => source.uri;
198 184
199 /** 185 /**
200 * Return `true` if the given [uri] is a `file` URI. 186 * Return `true` if the given [uri] is a `file` URI.
201 */ 187 */
202 static bool _isFileUri(Uri uri) => uri.scheme == _FILE_SCHEME; 188 static bool _isFileUri(Uri uri) => uri.scheme == _FILE_SCHEME;
203 } 189 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/lib/file_system/memory_file_system.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698