Index: sdk/lib/io/file.dart |
diff --git a/sdk/lib/io/file.dart b/sdk/lib/io/file.dart |
index 86d6cd6542edd9ed1587d3e6c44ca267c9553a77..1c0e37142e8899b19ff2a8a1bcb70a2425a76044 100644 |
--- a/sdk/lib/io/file.dart |
+++ b/sdk/lib/io/file.dart |
@@ -44,20 +44,30 @@ abstract class File implements FileSystemEntity { |
* Create the file. Returns a [:Future<File>:] that completes with |
* the file when it has been created. |
* |
+ * If [recursive] is false, the default, the file is created only if |
+ * all directories in the path exist. If [recursive] is true, all |
+ * non-existing path components are created. |
+ * |
* Existing files are left untouched by [create]. Calling [create] on an |
* existing file might fail if there are restrictive permissions on |
* the file. |
+ * |
+ * Completes the future with a [FileSystemException] if the operation fails. |
*/ |
- Future<File> create(); |
+ Future<File> create({bool recursive: false}); |
/** |
* Synchronously create the file. Existing files are left untouched |
* by [createSync]. Calling [createSync] on an existing file might fail |
* if there are restrictive permissions on the file. |
* |
+ * If [recursive] is false, the default, the file is created |
+ * only if all directories in the path exist. |
+ * If [recursive] is true, all non-existing path components are created. |
+ * |
* Throws a [FileSystemException] if the operation fails. |
*/ |
- void createSync(); |
+ void createSync({bool recursive: false}); |
/** |
* Renames this file. Returns a `Future<File>` that completes |