Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(450)

Unified Diff: sdk/lib/io/file.dart

Issue 65843002: Updated docs for FileMode. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/io/file.dart
diff --git a/sdk/lib/io/file.dart b/sdk/lib/io/file.dart
index 5888f92ce6bbbbe6e832a3b8575be6bfc06bf43b..152fb6edf8c678326ec2065ae51df7a7703f3462 100644
--- a/sdk/lib/io/file.dart
+++ b/sdk/lib/io/file.dart
@@ -8,15 +8,25 @@ part of dart.io;
* FileMode describes the modes in which a file can be opened.
*/
class FileMode {
+ /// The [FileMode] for opening a file only for reading.
static const READ = const FileMode._internal(0);
+ /// The [FileMode] for opening a file for reading and writing. The file will
+ /// be overwritten. If the file does not exist, it will be created.
static const WRITE = const FileMode._internal(1);
+ /// The [FileMode] for opening a file for reading a file and writing to the
+ /// end of it. If the file does not exist, it will be created.
static const APPEND = const FileMode._internal(2);
const FileMode._internal(int this._mode);
final int _mode;
}
+/// The [FileMode] for opening a file only for reading.
const READ = FileMode.READ;
+/// The [FileMode] for opening a file for reading and writing. The file will be
+/// overwritten. If the file does not exist, it will be created.
const WRITE = FileMode.WRITE;
+/// The [FileMode] for opening a file for reading a file and writing to the end
+/// of it. If the file does not exist, it will be created.
const APPEND = FileMode.APPEND;
/**
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698