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

Unified Diff: utils/pub/git_source.dart

Issue 12253054: Get rid of join() and encapsulate File and Directory in io.dart. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebase. Created 7 years, 10 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
« no previous file with comments | « utils/pub/entrypoint.dart ('k') | utils/pub/hosted_source.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/pub/git_source.dart
diff --git a/utils/pub/git_source.dart b/utils/pub/git_source.dart
index ab2758efdaeb5f32e4849ce39c4da1ac60872d06..fdb0ed4828c8e9ebcc35ea2ebceadab57f4136ed 100644
--- a/utils/pub/git_source.dart
+++ b/utils/pub/git_source.dart
@@ -5,6 +5,9 @@
library git_source;
import 'dart:async';
+
+import '../../pkg/path/lib/path.dart' as path;
+
import 'git.dart' as git;
import 'io.dart';
import 'package.dart';
@@ -42,7 +45,7 @@ class GitSource extends Source {
"Please ensure Git is correctly installed.");
}
- ensureDir(join(systemCacheRoot, 'cache'));
+ ensureDir(path.join(systemCacheRoot, 'cache'));
return _ensureRepoCache(id);
}).then((_) => systemCacheDirectory(id)).then((path) {
revisionCachePath = path;
@@ -61,7 +64,7 @@ class GitSource extends Source {
Future<String> systemCacheDirectory(PackageId id) {
return _revisionAt(id).then((rev) {
var revisionCacheName = '${id.name}-$rev';
- return join(systemCacheRoot, revisionCacheName);
+ return path.join(systemCacheRoot, revisionCacheName);
});
}
/// Ensures [description] is a Git URL.
@@ -148,7 +151,7 @@ class GitSource extends Source {
/// [id] (the one in `<system cache>/git/cache`).
String _repoCachePath(PackageId id) {
var repoCacheName = '${id.name}-${sha1(_getUrl(id))}';
- return join(systemCacheRoot, 'cache', repoCacheName);
+ return path.join(systemCacheRoot, 'cache', repoCacheName);
}
/// Returns the repository URL for [id].
« no previous file with comments | « utils/pub/entrypoint.dart ('k') | utils/pub/hosted_source.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698