Chromium Code Reviews| Index: runtime/bin/directory.dart |
| diff --git a/runtime/bin/directory.dart b/runtime/bin/directory.dart |
| index 664db22ddb24908c5fe2370f7d9086879962d963..a94658e4444989c61977a9329ec55132db62db3e 100644 |
| --- a/runtime/bin/directory.dart |
| +++ b/runtime/bin/directory.dart |
| @@ -6,25 +6,17 @@ interface Directory factory _Directory { |
| /** |
| * Creates a directory object. The path is either a full path or |
| * relative to the directory in which the Dart VM was |
| - * started. Throws an exception if the path does not specify a |
| - * directory. |
| + * started. |
| */ |
| - Directory.open(String dir); |
| - |
| - /** |
| - * Close this [Directory]. Terminates listing operation if one is in |
| - * progress. Returns a boolean indicating whether the close operation |
| - * succeeded. |
| - */ |
| - bool close(); |
| + Directory(String dir); |
| /** |
| * List the sub-directories and files of this |
| * [Directory]. Optionally recurse into sub-directories. For each |
| * file and directory, the file or directory handler is called. When |
| * all directories have been listed the done handler is called. If |
| - * the listing operation is recursive, the directory error handler |
| - * is called if a subdirectory cannot be opened for listing. |
| + * the listing operation is recursive, the error handler is called |
| + * if a subdirectory cannot be opened for listing. |
| */ |
| void list([bool recursive]); |
| @@ -36,22 +28,22 @@ interface Directory factory _Directory { |
| void setDirHandler(void dirHandler(String dir)); |
| /** |
| - * Sets the file handler that is called for all directories during |
| - * listing operations. The directory handler is called with the full |
| - * path of the file. |
| + * Sets the file handler that is called for all files during listing |
| + * operations. The file handler is called with the full path of the |
| + * file. |
| */ |
| void setFileHandler(void fileHandler(String file)); |
| /** |
| - * Set the done handler that is called either when a directory |
| - * listing is completed or when the close method is called. |
| + * Set the done 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. |
|
Søren Gjesse
2011/10/12 09:30:30
What does "not completed" actually mean? Will the
Mads Ager (google)
2011/10/12 10:36:28
Good question. :)
Currently, done means that no e
|
| */ |
| void setDoneHandler(void doneHandler(bool completed)); |
| /** |
| - * Set the directory error handler that is called for all |
| - * directories that cannot be opened for listing during recursive |
| - * listing. |
| + * Sets the error handler that is called on errors listing |
| + * directories. |
| */ |
| - void setDirErrorHandler(void errorHandler(String dir)); |
| + void setErrorHandler(void errorHandler(String error)); |
| } |