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

Side by Side Diff: utils/pub/entrypoint.dart

Issue 11475046: Add Bob's path library to pub. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 entrypoint; 5 library entrypoint;
6 6
7 import 'io.dart'; 7 import 'io.dart';
8 import 'lock_file.dart'; 8 import 'lock_file.dart';
9 import 'package.dart'; 9 import 'package.dart';
10 import 'root_source.dart'; 10 import 'root_source.dart';
11 import 'system_cache.dart'; 11 import 'system_cache.dart';
12 import 'utils.dart';
12 import 'version.dart'; 13 import 'version.dart';
13 import 'version_solver.dart'; 14 import 'version_solver.dart';
14 import 'utils.dart';
15 15
16 /** 16 /**
17 * Pub operates over a directed graph of dependencies that starts at a root 17 * Pub operates over a directed graph of dependencies that starts at a root
18 * "entrypoint" package. This is typically the package where the current 18 * "entrypoint" package. This is typically the package where the current
19 * working directory is located. An entrypoint knows the [root] package it is 19 * working directory is located. An entrypoint knows the [root] package it is
20 * associated with and is responsible for managing the "packages" directory 20 * associated with and is responsible for managing the "packages" directory
21 * for it. 21 * for it.
22 * 22 *
23 * That directory contains symlinks to all packages used by an app. These links 23 * That directory contains symlinks to all packages used by an app. These links
24 * point either to the [SystemCache] or to some other location on the local 24 * point either to the [SystemCache] or to some other location on the local
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 * Creates a symlink to the `packages` directory in [dir] if none exists. 279 * Creates a symlink to the `packages` directory in [dir] if none exists.
280 */ 280 */
281 Future _linkSecondaryPackageDir(String dir) { 281 Future _linkSecondaryPackageDir(String dir) {
282 var to = join(dir, 'packages'); 282 var to = join(dir, 'packages');
283 return exists(to).chain((exists) { 283 return exists(to).chain((exists) {
284 if (exists) return new Future.immediate(null); 284 if (exists) return new Future.immediate(null);
285 return createSymlink(path, to); 285 return createSymlink(path, to);
286 }); 286 });
287 } 287 }
288 } 288 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698