Index: sdk/lib/io/file.dart |
diff --git a/sdk/lib/io/file.dart b/sdk/lib/io/file.dart |
index 1bfcb6cc42022f203a06db3c71036ef5a321d106..e86640b5290e8db0f16a63b164dc677ee48731bb 100644 |
--- a/sdk/lib/io/file.dart |
+++ b/sdk/lib/io/file.dart |
@@ -130,7 +130,7 @@ abstract class File extends FileSystemEntity { |
* [FileMode.APPEND]: same as [FileMode.WRITE] except that the file is |
* not truncated. |
*/ |
- Future<RandomAccessFile> open([FileMode mode = FileMode.READ]); |
+ Future<RandomAccessFile> open({FileMode mode: FileMode.READ}); |
/** |
* Synchronously open the file for random access operations. The |
@@ -140,7 +140,7 @@ abstract class File extends FileSystemEntity { |
* |
* See [open] for information on the [mode] argument. |
*/ |
- RandomAccessFile openSync([FileMode mode = FileMode.READ]); |
+ RandomAccessFile openSync({FileMode mode: FileMode.READ}); |
/** |
* Get the canonical full path corresponding to the file path. |
@@ -202,13 +202,13 @@ abstract class File extends FileSystemEntity { |
* Returns a [:Future<String>:] that completes with the string once |
* the file contents has been read. |
*/ |
- Future<String> readAsString([Encoding encoding = Encoding.UTF_8]); |
+ Future<String> readAsString({Encoding encoding: Encoding.UTF_8}); |
/** |
* Synchronously read the entire file contents as a string using the |
* given [Encoding]. |
*/ |
- String readAsStringSync([Encoding encoding = Encoding.UTF_8]); |
+ String readAsStringSync({Encoding encoding: Encoding.UTF_8}); |
/** |
* Read the entire file contents as lines of text using the given |
@@ -217,13 +217,13 @@ abstract class File extends FileSystemEntity { |
* Returns a [:Future<List<String>>:] that completes with the lines |
* once the file contents has been read. |
*/ |
- Future<List<String>> readAsLines([Encoding encoding = Encoding.UTF_8]); |
+ Future<List<String>> readAsLines({Encoding encoding: Encoding.UTF_8}); |
/** |
* Synchronously read the entire file contents as lines of text |
* using the given [Encoding]. |
*/ |
- List<String> readAsLinesSync([Encoding encoding = Encoding.UTF_8]); |
+ List<String> readAsLinesSync({Encoding encoding: Encoding.UTF_8}); |
/** |
* Write a list of bytes to a file. |
@@ -236,7 +236,7 @@ abstract class File extends FileSystemEntity { |
* file if it already exists. In order to append the bytes to an existing |
* file, pass [FileMode.APPEND] as the optional mode parameter. |
*/ |
- Future<File> writeAsBytes(List<int> bytes, [FileMode mode = FileMode.WRITE]); |
+ Future<File> writeAsBytes(List<int> bytes, {FileMode mode: FileMode.WRITE}); |
/** |
* Synchronously write a list of bytes to a file. |
@@ -247,7 +247,7 @@ abstract class File extends FileSystemEntity { |
* the file if it already exists. In order to append the bytes to an existing |
* file, pass [FileMode.APPEND] as the optional mode parameter. |
*/ |
- void writeAsBytesSync(List<int> bytes, [FileMode mode = FileMode.WRITE]); |
+ void writeAsBytesSync(List<int> bytes, {FileMode mode: FileMode.WRITE}); |
/** |
* Write a string to a file. |
@@ -376,7 +376,7 @@ abstract class RandomAccessFile { |
* RandomAccessFile when the write completes. |
*/ |
Future<RandomAccessFile> writeString(String string, |
- [Encoding encoding = Encoding.UTF_8]); |
+ {Encoding encoding: Encoding.UTF_8}); |
/** |
* Synchronously writes a single string to the file using the given |
@@ -384,7 +384,7 @@ abstract class RandomAccessFile { |
* written. |
*/ |
int writeStringSync(String string, |
- [Encoding encoding = Encoding.UTF_8]); |
+ {Encoding encoding: Encoding.UTF_8}); |
/** |
* Gets the current byte position in the file. Returns a |