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

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

Issue 1444943003: Use AbsolutePathContext in Folder.contains(). (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 1 month 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 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:analyzer/src/util/absolute_path.dart';
10 import 'package:path/path.dart'; 11 import 'package:path/path.dart';
11 import 'package:watcher/watcher.dart'; 12 import 'package:watcher/watcher.dart';
12 13
13 /** 14 /**
14 * [File]s are leaf [Resource]s which contain data. 15 * [File]s are leaf [Resource]s which contain data.
15 */ 16 */
16 abstract class File extends Resource { 17 abstract class File extends Resource {
17 /** 18 /**
18 * Watch for changes to this file 19 * Watch for changes to this file
19 */ 20 */
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 */ 128 */
128 bool isOrContains(String path); 129 bool isOrContains(String path);
129 } 130 }
130 131
131 /** 132 /**
132 * Instances of the class [ResourceProvider] convert [String] paths into 133 * Instances of the class [ResourceProvider] convert [String] paths into
133 * [Resource]s. 134 * [Resource]s.
134 */ 135 */
135 abstract class ResourceProvider { 136 abstract class ResourceProvider {
136 /** 137 /**
138 * Get the absolute path context used by this resource provider.
139 */
140 AbsolutePathContext get absolutePathContext;
141
142 /**
137 * Get the path context used by this resource provider. 143 * Get the path context used by this resource provider.
138 */ 144 */
139 Context get pathContext; 145 Context get pathContext;
140 146
141 /** 147 /**
142 * Return a [File] that corresponds to the given [path]. 148 * Return a [File] that corresponds to the given [path].
143 * 149 *
144 * A file may or may not exist at this location. 150 * A file may or may not exist at this location.
145 */ 151 */
146 File getFile(String path); 152 File getFile(String path);
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 201
196 @override 202 @override
197 Uri restoreAbsolute(Source source) => 203 Uri restoreAbsolute(Source source) =>
198 _provider.pathContext.toUri(source.fullName); 204 _provider.pathContext.toUri(source.fullName);
199 205
200 /** 206 /**
201 * Return `true` if the given [uri] is a `file` URI. 207 * Return `true` if the given [uri] is a `file` URI.
202 */ 208 */
203 static bool _isFileUri(Uri uri) => uri.scheme == _FILE_SCHEME; 209 static bool _isFileUri(Uri uri) => uri.scheme == _FILE_SCHEME;
204 } 210 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/lib/src/context_manager.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