Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | |
| 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. | |
| 4 | |
| 5 library barback.asset_provider; | |
| 6 | |
| 7 import 'dart:async'; | |
| 8 | |
| 9 import '../barback.dart'; | |
| 10 | |
| 11 /// API for locating and accessing packages on disk. Implemented by pub and | |
| 12 /// provided to barback so that it isn't coupled directly to pub. | |
| 13 abstract class AssetProvider { | |
| 14 /// The names of all packages that can be provided by this provider. This = | |
|
nweiz
2013/06/18 23:14:46
Remove "="
Bob Nystrom
2013/06/20 00:23:59
Done.
| |
| 15 /// will be the transitive dependency graph of the entrypoint package. | |
|
nweiz
2013/06/18 23:14:46
Saying that this will be a graph is a little confu
Bob Nystrom
2013/06/20 00:23:59
Done.
| |
| 16 Iterable<String> get packages; | |
| 17 | |
| 18 // TODO(rnystrom): Make this async. | |
| 19 /// The paths of all available asset files in [package], relative to the | |
| 20 /// package's root directory. | |
| 21 /// | |
| 22 /// You can pass [within], which should be the relative path to a directory | |
| 23 /// within the package, to only return the files within that subdirectory. | |
| 24 List<AssetId> listAssets(String package, {String within}); | |
| 25 | |
| 26 Future<Asset> getAsset(AssetId id); | |
| 27 } | |
| OLD | NEW |