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

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

Issue 952333002: Don't do folder existence checks when parsing pub list results. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 10 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 | Annotate | Revision Log
« 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 * Return an existing child [Resource] with the given [relPath]. 70 * Return an existing child [Resource] with the given [relPath].
71 * Return a not existing [File] if no such child exist. 71 * Return a not existing [File] if no such child exist.
72 */ 72 */
73 Resource getChild(String relPath); 73 Resource getChild(String relPath);
74 74
75 /** 75 /**
76 * Return a list of existing direct children [Resource]s (folders and files) 76 * Return a list of existing direct children [Resource]s (folders and files)
77 * in this folder, in no particular order. 77 * in this folder, in no particular order.
78 */ 78 */
79 List<Resource> getChildren(); 79 List<Resource> getChildren();
80
81 /**
82 * Return a [Folder] representing a child [Resource] with the given
83 * [relPath]. This call does not check whether a folder with the given name
84 * exists on the filesystem--client must call the [Folder]'s `exists` getter
85 * to determine whether the folder actually exists.
86 */
87 Folder getChildAssumingFolder(String relPath);
80 } 88 }
81 89
82 90
83 /** 91 /**
84 * The abstract class [Resource] is an abstraction of file or folder. 92 * The abstract class [Resource] is an abstraction of file or folder.
85 */ 93 */
86 abstract class Resource { 94 abstract class Resource {
87 /** 95 /**
88 * Return `true` if this resource exists. 96 * Return `true` if this resource exists.
89 */ 97 */
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 Uri restoreAbsolute(Source source) => source.uri; 178 Uri restoreAbsolute(Source source) => source.uri;
171 179
172 /** 180 /**
173 * Return `true` if the given URI is a `file` URI. 181 * Return `true` if the given URI is a `file` URI.
174 * 182 *
175 * @param uri the URI being tested 183 * @param uri the URI being tested
176 * @return `true` if the given URI is a `file` URI 184 * @return `true` if the given URI is a `file` URI
177 */ 185 */
178 static bool _isFileUri(Uri uri) => uri.scheme == _FILE_SCHEME; 186 static bool _isFileUri(Uri uri) => uri.scheme == _FILE_SCHEME;
179 } 187 }
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