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

Unified Diff: utils/pub/io.dart

Issue 10699068: Add numerous features to the Pub test infrastructure. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 6 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 | « no previous file | utils/pub/utils.dart » ('j') | utils/tests/pub/test_pub.dart » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/pub/io.dart
diff --git a/utils/pub/io.dart b/utils/pub/io.dart
index 039965ee92e7056616f5d596f6df4543b45f5437..84d01bc0fe4c925bad2bd0db19786c665ac6da1e 100644
--- a/utils/pub/io.dart
+++ b/utils/pub/io.dart
@@ -125,6 +125,15 @@ Future<File> writeTextFile(file, String contents) {
}
/**
+ * Asynchronously deletes [file], which can be a [String] or a [File]. Returns a
+ * [Future] that completes when the deletion is done.
+ */
+Future<Directory> deleteFile(file) {
+ file = _getFile(file);
+ return file.delete();
+}
+
+/**
* Creates a directory [dir]. Returns a [Future] that completes when the
* directory is created.
*/
« no previous file with comments | « no previous file | utils/pub/utils.dart » ('j') | utils/tests/pub/test_pub.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698