Chromium Code Reviews| Index: runtime/bin/directory.dart |
| diff --git a/runtime/bin/directory.dart b/runtime/bin/directory.dart |
| index 415584354eb725e9031bb83b1a0e5857d46e4a71..1de345d50e519ffb83b72c9d1c904d11eeb74339 100644 |
| --- a/runtime/bin/directory.dart |
| +++ b/runtime/bin/directory.dart |
| @@ -15,8 +15,8 @@ interface Directory default _Directory { |
| /** |
| * Check whether a directory with this name already exists. If the |
| - * operation completes successfully the [existsHandler] is called with |
| - * the result. Otherwise the [errorHandler] is called. |
| + * operation completes successfully [onExists] is called with the |
| + * result. Otherwise [onError] is called. |
| */ |
| void exists(); |
| @@ -26,9 +26,9 @@ interface Directory default _Directory { |
| bool existsSync(); |
| /** |
| - * Creates the directory with this name if it does not exist. |
| - * If the directory is successfully created the [createHandler] is |
| - * called. Otherwise the [errorHandler] is called. |
| + * Creates the directory with this name if it does not exist. If |
| + * the directory is successfully created [onCreate] is |
| + * called. Otherwise [onError] is called. |
| */ |
| void create(); |
| @@ -46,7 +46,7 @@ interface Directory default _Directory { |
| * 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 |
| + * [onCreateTemp] will be called. The error handler is called if |
| * the temporary directory cannot be created. |
| */ |
| void createTemp(); |
| @@ -63,8 +63,7 @@ interface Directory default _Directory { |
| /** |
| * Deletes the directory with this name. If the operation completes |
| - * successfully the [deleteHandler] is called. Otherwise the |
| - * [errorHandler] is called. |
| + * successfully [onDelete] is called. Otherwise [onError] is called. |
| * |
| * If [recursive] is [:true:] this directory and all sub-directories |
| * and files in the directory are deleted. If [recursive] is |
| @@ -99,50 +98,50 @@ interface Directory default _Directory { |
| * during listing operations. The directory handler is called with |
| * the full path of the directory. |
| */ |
| - void set dirHandler(void dirHandler(String dir)); |
| + void set onDir(void onDir(String dir)); |
| /** |
| * Sets the handler that is called for all files during listing |
| * operations. The file handler is called with the full path of the |
| * file. |
| */ |
| - void set fileHandler(void fileHandler(String file)); |
| + void set onFile(void onFile(String file)); |
| /** |
| * Set the handler that is called when a directory listing is |
| * done. The handler is called with an indication of whether or not |
| * the listing operation completed. |
| */ |
| - void set doneHandler(void doneHandler(bool completed)); |
| + void set onDone(void onDone(bool completed)); |
| /** |
| * Set the handler that is called when checking if a directory with this |
| * name exists. |
| */ |
| - void set existsHandler(void existsHandler(bool exists)); |
| + void set onExists(void onExists(bool exists)); |
| /** |
| * Set the handler that is called when a directory is successfully created. |
| */ |
| - void set createHandler(void createHandler()); |
| + void set onCreate(void onCreate()); |
|
Søren Gjesse
2012/02/29 07:41:24
Wondering whether this should be onCreated instead
|
| /** |
| * Set the handler that is called when a temporary directory is |
| * successfully created. |
| */ |
| - void set createTempHandler(void createTempHandler()); |
| + void set onCreateTemp(void onCreateTemp()); |
|
Søren Gjesse
2012/02/29 07:41:24
Same here onTempCreated?
|
| /** |
| * Set the handler that is called when a directory is successfully |
| * deleted. |
| */ |
| - void set deleteHandler(void deleteHandler()); |
| + void set onDelete(void onDelete()); |
|
Søren Gjesse
2012/02/29 07:41:24
onDeleted?
|
| /** |
| * Sets the handler that is called if there is an error while listing |
| * or creating directories. |
| */ |
| - void set errorHandler(void errorHandler(String error)); |
| + void set onError(void onError(String error)); |
| /** |
| * Gets the path of this directory. |