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

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

Issue 11437019: Add logging system to pub and sprinkle some logging in. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Tweak output. 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
« no previous file with comments | « utils/pub/pub.dart ('k') | utils/pub/validator.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 system_cache; 5 library system_cache;
6 6
7 import 'dart:io'; 7 import 'dart:io';
8 8
9 import 'git_source.dart'; 9 import 'git_source.dart';
10 import 'hosted_source.dart'; 10 import 'hosted_source.dart';
11 import 'io.dart'; 11 import 'io.dart';
12 import 'io.dart' as io show createTempDir; 12 import 'io.dart' as io show createTempDir;
13 import 'log.dart' as log;
13 import 'package.dart'; 14 import 'package.dart';
14 import 'sdk_source.dart'; 15 import 'sdk_source.dart';
15 import 'source.dart'; 16 import 'source.dart';
16 import 'source_registry.dart'; 17 import 'source_registry.dart';
17 import 'utils.dart'; 18 import 'utils.dart';
18 import 'version.dart'; 19 import 'version.dart';
19 20
20 /** 21 /**
21 * The system-wide cache of installed packages. 22 * The system-wide cache of installed packages.
22 * 23 *
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 /// temp directory to ensure that it's on the same volume as the pub system 96 /// temp directory to ensure that it's on the same volume as the pub system
96 /// cache so that it can move the directory from it. 97 /// cache so that it can move the directory from it.
97 Future<Directory> createTempDir() { 98 Future<Directory> createTempDir() {
98 return ensureDir(tempDir).chain((temp) { 99 return ensureDir(tempDir).chain((temp) {
99 return io.createTempDir(join(temp, 'dir')); 100 return io.createTempDir(join(temp, 'dir'));
100 }); 101 });
101 } 102 }
102 103
103 /// Delete's the system cache's internal temp directory. 104 /// Delete's the system cache's internal temp directory.
104 Future deleteTempDir() { 105 Future deleteTempDir() {
106 log.fine('Clean up system cache temp directory $tempDir.');
105 return dirExists(tempDir).chain((exists) { 107 return dirExists(tempDir).chain((exists) {
106 if (!exists) return new Future.immediate(null); 108 if (!exists) return new Future.immediate(null);
107 return deleteDir(tempDir); 109 return deleteDir(tempDir);
108 }); 110 });
109 } 111 }
110 } 112 }
OLDNEW
« no previous file with comments | « utils/pub/pub.dart ('k') | utils/pub/validator.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698