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

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

Issue 632353002: Add support for cross-session storage (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 2 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
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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 abstract class ResourceProvider { 102 abstract class ResourceProvider {
103 /** 103 /**
104 * Get the path context used by this resource provider. 104 * Get the path context used by this resource provider.
105 */ 105 */
106 Context get pathContext; 106 Context get pathContext;
107 107
108 /** 108 /**
109 * Return the [Resource] that corresponds to the given [path]. 109 * Return the [Resource] that corresponds to the given [path].
110 */ 110 */
111 Resource getResource(String path); 111 Resource getResource(String path);
112
113 /**
114 * Return the folder in which the plugin with the given [pluginId] can store
115 * state that will persist across sessions. The folder returned for a given id
116 * will not be returned for a different id, ensuring that plugins do not need
117 * to be concerned with file name collisions with other plugins, assuming that
118 * the plugin ids are unique. The plugin ids must be valid folder names.
119 */
120 Folder getStateLocation(String pluginId);
112 } 121 }
113 122
114 123
115 /** 124 /**
116 * A [UriResolver] for [Resource]s. 125 * A [UriResolver] for [Resource]s.
117 */ 126 */
118 class ResourceUriResolver extends UriResolver { 127 class ResourceUriResolver extends UriResolver {
119 /** 128 /**
120 * The name of the `file` scheme. 129 * The name of the `file` scheme.
121 */ 130 */
(...skipping 17 matching lines...) Expand all
139 } 148 }
140 149
141 /** 150 /**
142 * Return `true` if the given URI is a `file` URI. 151 * Return `true` if the given URI is a `file` URI.
143 * 152 *
144 * @param uri the URI being tested 153 * @param uri the URI being tested
145 * @return `true` if the given URI is a `file` URI 154 * @return `true` if the given URI is a `file` URI
146 */ 155 */
147 static bool _isFileUri(Uri uri) => uri.scheme == _FILE_SCHEME; 156 static bool _isFileUri(Uri uri) => uri.scheme == _FILE_SCHEME;
148 } 157 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698