| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 part of dart.io; | 5 part of dart.io; |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * A reference to a directory (or _folder_) on the file system. | 8 * A reference to a directory (or _folder_) on the file system. |
| 9 */ | 9 */ |
| 10 abstract class Directory implements FileSystemEntity { | 10 abstract class Directory implements FileSystemEntity { |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 * Creates the directory with this name. | 47 * Creates the directory with this name. |
| 48 * | 48 * |
| 49 * If [recursive] is false, only the last directory in the path is | 49 * If [recursive] is false, only the last directory in the path is |
| 50 * created. If [recursive] is true, all non-existing path components | 50 * created. If [recursive] is true, all non-existing path components |
| 51 * are created. If the directory already exists nothing is done. | 51 * are created. If the directory already exists nothing is done. |
| 52 * | 52 * |
| 53 * Returns a [:Future<Directory>:] that completes with this | 53 * Returns a [:Future<Directory>:] that completes with this |
| 54 * directory once it has been created. If the directory cannot be | 54 * directory once it has been created. If the directory cannot be |
| 55 * created the future completes with an exception. | 55 * created the future completes with an exception. |
| 56 */ | 56 */ |
| 57 Future<Directory> create({recursive: false}); | 57 Future<Directory> create({bool recursive: false}); |
| 58 | 58 |
| 59 /** | 59 /** |
| 60 * Synchronously creates the directory with this name. | 60 * Synchronously creates the directory with this name. |
| 61 * | 61 * |
| 62 * If [recursive] is false, only the last directory in the path is | 62 * If [recursive] is false, only the last directory in the path is |
| 63 * created. If [recursive] is true, all non-existing path components | 63 * created. If [recursive] is true, all non-existing path components |
| 64 * are created. If the directory already exists nothing is done. | 64 * are created. If the directory already exists nothing is done. |
| 65 * | 65 * |
| 66 * If the directory cannot be created an exception is thrown. | 66 * If the directory cannot be created an exception is thrown. |
| 67 */ | 67 */ |
| 68 void createSync({recursive: false}); | 68 void createSync({bool recursive: false}); |
| 69 | 69 |
| 70 /** | 70 /** |
| 71 * Creates a temporary directory with a name based on the current | 71 * Creates a temporary directory with a name based on the current |
| 72 * path. The path is used as a template, and additional | 72 * path. The path is used as a template, and additional |
| 73 * characters are appended to it to make a unique temporary | 73 * characters are appended to it to make a unique temporary |
| 74 * directory name. If the path is the empty string, a default | 74 * directory name. If the path is the empty string, a default |
| 75 * system temp directory and name are used for the template. | 75 * system temp directory and name are used for the template. |
| 76 * | 76 * |
| 77 * Returns a [:Future<Directory>:] that completes with the newly | 77 * Returns a [:Future<Directory>:] that completes with the newly |
| 78 * created temporary directory. | 78 * created temporary directory. |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 if (path != null) { | 199 if (path != null) { |
| 200 sb.write(", path = $path"); | 200 sb.write(", path = $path"); |
| 201 } | 201 } |
| 202 } | 202 } |
| 203 return sb.toString(); | 203 return sb.toString(); |
| 204 } | 204 } |
| 205 final String message; | 205 final String message; |
| 206 final String path; | 206 final String path; |
| 207 final OSError osError; | 207 final OSError osError; |
| 208 } | 208 } |
| OLD | NEW |