OLD | NEW |
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 pub.system_cache; | |
6 | |
7 import 'dart:io'; | 5 import 'dart:io'; |
8 | 6 |
9 import 'package:path/path.dart' as path; | 7 import 'package:path/path.dart' as path; |
10 | 8 |
11 import 'io.dart'; | 9 import 'io.dart'; |
12 import 'io.dart' as io show createTempDir; | 10 import 'io.dart' as io show createTempDir; |
13 import 'log.dart' as log; | 11 import 'log.dart' as log; |
14 import 'package.dart'; | 12 import 'package.dart'; |
15 import 'source/cached.dart'; | 13 import 'source/cached.dart'; |
16 import 'source/git.dart'; | 14 import 'source/git.dart'; |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 var temp = ensureDir(tempDir); | 96 var temp = ensureDir(tempDir); |
99 return io.createTempDir(temp, 'dir'); | 97 return io.createTempDir(temp, 'dir'); |
100 } | 98 } |
101 | 99 |
102 /// Deletes the system cache's internal temp directory. | 100 /// Deletes the system cache's internal temp directory. |
103 void deleteTempDir() { | 101 void deleteTempDir() { |
104 log.fine('Clean up system cache temp directory $tempDir.'); | 102 log.fine('Clean up system cache temp directory $tempDir.'); |
105 if (dirExists(tempDir)) deleteEntry(tempDir); | 103 if (dirExists(tempDir)) deleteEntry(tempDir); |
106 } | 104 } |
107 } | 105 } |
OLD | NEW |