Chromium Code Reviews| Index: sdk/lib/io/file.dart |
| diff --git a/sdk/lib/io/file.dart b/sdk/lib/io/file.dart |
| index 879915825fa507d261a10656f3b34eb4de933694..c8088c92aa1bce9a79c2a8ea254ea0a6476c084a 100644 |
| --- a/sdk/lib/io/file.dart |
| +++ b/sdk/lib/io/file.dart |
| @@ -10,13 +10,20 @@ part of dart.io; |
| class FileMode { |
| /// The mode for opening a file only for reading. |
| static const READ = const FileMode._internal(0); |
| - /// The mode for opening a file for reading and writing. The file is |
| + /// Mode for opening a file for reading and writing. The file is |
| /// overwritten if it already exists. The file is created if it does not |
| /// already exist. |
| static const WRITE = const FileMode._internal(1); |
| - /// The mode for opening a file for reading and writing to the |
| + /// Mode for opening a file for reading and writing to the |
| /// end of it. The file is created if it does not already exist. |
| static const APPEND = const FileMode._internal(2); |
| + /// Mode for opening a file for writing *only*. The file is |
| + /// overwritten if it already exists. The file is created if it does not |
| + /// already exist. |
| + static const WRITE_ONLY = const FileMode._internal(3); |
| + /// Mode for opening a file for writing *only* to the |
| + /// end of it. The file is created if it does not already exist. |
| + static const WRITE_ONLY_APPEND = const FileMode._internal(4); |
| final int _mode; |
| const FileMode._internal(this._mode); |
| @@ -32,6 +39,10 @@ const WRITE = FileMode.WRITE; |
| /// end of it. The file is created if it does not already exist. |
| const APPEND = FileMode.APPEND; |
| +const WRITE_ONLY = FileMode.WRITE_ONLY; |
|
Mads Ager (google)
2015/06/18 12:04:48
You should duplicate the doc comments here.
|
| + |
| +const WRITE_ONLY_APPEND = FileMode.WRITE_ONLY_APPEND; |
| + |
| /// Type of lock when requesting a lock on a file. |
| enum FileLock { |