Chromium Code Reviews| Index: pkg/barback/lib/src/asset_provider.dart |
| diff --git a/pkg/barback/lib/src/asset_provider.dart b/pkg/barback/lib/src/asset_provider.dart |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..74d2005f2375c3c516dbdca883284e20f6b9f2bd |
| --- /dev/null |
| +++ b/pkg/barback/lib/src/asset_provider.dart |
| @@ -0,0 +1,27 @@ |
| +// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| +// for details. All rights reserved. Use of this source code is governed by a |
| +// BSD-style license that can be found in the LICENSE file. |
| + |
| +library barback.asset_provider; |
| + |
| +import 'dart:async'; |
| + |
| +import '../barback.dart'; |
| + |
| +/// API for locating and accessing packages on disk. Implemented by pub and |
| +/// provided to barback so that it isn't coupled directly to pub. |
| +abstract class AssetProvider { |
| + /// 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.
|
| + /// 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.
|
| + Iterable<String> get packages; |
| + |
| + // TODO(rnystrom): Make this async. |
| + /// The paths of all available asset files in [package], relative to the |
| + /// package's root directory. |
| + /// |
| + /// You can pass [within], which should be the relative path to a directory |
| + /// within the package, to only return the files within that subdirectory. |
| + List<AssetId> listAssets(String package, {String within}); |
| + |
| + Future<Asset> getAsset(AssetId id); |
| +} |