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

Unified Diff: runtime/bin/directory.dart

Issue 9316066: Implement recursive directory deletion. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 8 years, 11 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
Index: runtime/bin/directory.dart
diff --git a/runtime/bin/directory.dart b/runtime/bin/directory.dart
index 01e9d1317f109e4dece95bfbee3a33d684cceb9d..415584354eb725e9031bb83b1a0e5857d46e4a71 100644
--- a/runtime/bin/directory.dart
+++ b/runtime/bin/directory.dart
@@ -65,14 +65,24 @@ interface Directory default _Directory {
* Deletes the directory with this name. If the operation completes
* successfully the [deleteHandler] is called. Otherwise the
* [errorHandler] is called.
+ *
+ * If [recursive] is [:true:] this directory and all sub-directories
+ * and files in the directory are deleted. If [recursive] is
+ * [:false:] only this directory (which must be empty) is
+ * deleted. [recursive] is [:false:] by default.
*/
- void delete();
+ void delete([bool recursive]);
/**
* Deletes the directory with this name. Throws an exception
- * if the directory is not empty or if deletion failed.
- */
- void deleteSync();
+ * if the directory cannot be deleted.
+ *
+ * If [recursive] is [:true:] this directory and all sub-directories
+ * and files in the directory are deleted. If [recursive] is
+ * [:false:] only this directory (which must be empty) is
+ * deleted. [recursive] is [:false:] by default.
+ */
+ void deleteSync([bool recursive]);
/**
* List the sub-directories and files of this

Powered by Google App Engine
This is Rietveld 408576698