Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 source; | 5 library source; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 | 8 |
| 9 import '../../pkg/pathos/lib/path.dart' as path; | 9 import '../../pkg/pathos/lib/path.dart' as path; |
| 10 | 10 |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 208 /// the source can use the installed package to determine information about | 208 /// the source can use the installed package to determine information about |
| 209 /// the resolved id. | 209 /// the resolved id. |
| 210 /// | 210 /// |
| 211 /// The returned [PackageId] may have a description field that's invalid | 211 /// The returned [PackageId] may have a description field that's invalid |
| 212 /// according to [parseDescription], although it must still be serializable | 212 /// according to [parseDescription], although it must still be serializable |
| 213 /// to JSON and YAML. It must also be equal to [id] according to | 213 /// to JSON and YAML. It must also be equal to [id] according to |
| 214 /// [descriptionsEqual]. | 214 /// [descriptionsEqual]. |
| 215 /// | 215 /// |
| 216 /// By default, this just returns [id]. | 216 /// By default, this just returns [id]. |
| 217 Future<PackageId> resolveId(PackageId id) => new Future.immediate(id); | 217 Future<PackageId> resolveId(PackageId id) => new Future.immediate(id); |
| 218 | |
| 219 /// Returns a list of [Package] that have been cached in in Pub's global cache | |
|
Bob Nystrom
2013/03/12 22:12:03
Returns the [Package]s that have been installed in
keertip
2013/03/13 15:55:00
Done.
| |
| 220 /// directory. | |
| 221 Future<List<Package>> getCachedPackages() { | |
| 222 if (shouldCache) throw "Source $name must implement this."; | |
| 223 } | |
| 218 | 224 |
| 219 /// Returns the source's name. | 225 /// Returns the source's name. |
| 220 String toString() => name; | 226 String toString() => name; |
| 221 } | 227 } |
| OLD | NEW |