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

Unified Diff: runtime/bin/directory.dart

Issue 8588029: Add Directory.createTemp() to asynchronously create a temporary directory. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Added Windows code. Created 9 years, 1 month 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 a99de599780586b247cd411dc007b0bf68f39933..f1e55fec22a46b79e0652fb0e11038647ab4a932 100644
--- a/runtime/bin/directory.dart
+++ b/runtime/bin/directory.dart
@@ -22,6 +22,17 @@ interface Directory factory _Directory {
void createSync();
/**
+ * Creates a temporary directory with a name based on this name.
+ * This name is used as a template, and must contain consecutive
+ * 'X' characters, which will be replaced to create a uniqe directory name.
Mads Ager (google) 2011/11/18 09:50:45 unique? Is there a requirement on the number of '
Bill Hesse 2011/11/21 15:48:41 Changed. The template is the path, and the unique
+ * The new directory object will be passed to the provided callback,
+ * once it is created. The original directory object is unchanged.
+ * Throw an exception if the temporary directory cannot be created.
+ * The new directory inherits all handlers from the template directory.
+ */
+ void createTemp(void createdHandler(Directory tempDir));
Mads Ager (google) 2011/11/18 09:50:45 Please follow the style in the rest of the file an
+
+ /**
* Deletes the directory with this name. Throws an exception
* if the directory is not empty or if deletion failed.
*/

Powered by Google App Engine
This is Rietveld 408576698