Index: runtime/bin/directory.dart |
diff --git a/runtime/bin/directory.dart b/runtime/bin/directory.dart |
index a99de599780586b247cd411dc007b0bf68f39933..dcae9e55783a42c059e9b7a24caae0362dd08226 100644 |
--- a/runtime/bin/directory.dart |
+++ b/runtime/bin/directory.dart |
@@ -22,6 +22,19 @@ interface Directory factory _Directory { |
void createSync(); |
/** |
+ * Creates a temporary directory with a name based on the current path. |
+ * This name and path is used as a template, and additional characters are |
+ * appended to it by the call to make a unique directory name. If the |
+ * path is the empty string, a default system temp directory and name |
+ * are used for the template. |
+ * The path is modified to be the path of the new directory. |
+ * After the new directory is created, and the path modified, the callback |
+ * createTempHandler will be called. The error handler is called if |
+ * the temporary directory cannot be created. |
+ */ |
+ void createTemp(); |
+ |
+ /** |
* Deletes the directory with this name. Throws an exception |
* if the directory is not empty or if deletion failed. |
*/ |
@@ -59,7 +72,15 @@ interface Directory factory _Directory { |
void set doneHandler(void doneHandler(bool completed)); |
/** |
- * Sets the handler that is called on error listing directories. |
+ * Set the handler that is called when a temporary directory is created. |
Mads Ager (google)
2011/11/21 16:29:37
Maybe shorten this to just state that it is called
Bill Hesse
2011/11/22 12:49:39
Done.
|
+ * The handler is called when the directory creation is completed. |
+ * The error handler is called if the directory creation fails. |
+ */ |
+ void set createTempHandler(void doneHandler(bool completed)); |
+ |
+ /** |
+ * Sets the handler that is called if there is an error while listing |
+ * or creating directories. |
*/ |
void set errorHandler(void errorHandler(String error)); |