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

Unified Diff: sdk/lib/_internal/pub/lib/src/source.dart

Issue 20204003: First stab at a dev server in pub using barback. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Revise. Created 7 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: sdk/lib/_internal/pub/lib/src/source.dart
diff --git a/sdk/lib/_internal/pub/lib/src/source.dart b/sdk/lib/_internal/pub/lib/src/source.dart
index 66428f50b1b0d9c9de717083bc17629d744c7a26..99f12ab1f335fb88b73b496bac843f1e508cc17b 100644
--- a/sdk/lib/_internal/pub/lib/src/source.dart
+++ b/sdk/lib/_internal/pub/lib/src/source.dart
@@ -184,6 +184,14 @@ abstract class Source {
return false;
}
+ /// Returns the directory where this package has been installed. If this is
+ /// a cached source, it will be in the system cache. Otherwise, it will
+ /// depend on the source.
+ Future<String> getDirectory(PackageId id) {
+ if (shouldCache) return systemCacheDirectory(id);
+ throw new UnimplementedError("Source $name must implement this.");
+ }
+
/// Returns the directory in the system cache that the package identified by
/// [id] should be installed to. This should return a path to a subdirectory
/// of [systemCacheRoot].

Powered by Google App Engine
This is Rietveld 408576698