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

Unified Diff: runtime/bin/file.dart

Issue 9346015: Change file opening operation to set position at the end of the file when FileMode.APPEND is used. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 8 years, 10 months 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 | runtime/bin/file_impl.dart » ('j') | runtime/bin/file_linux.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/file.dart
===================================================================
--- runtime/bin/file.dart (revision 3943)
+++ runtime/bin/file.dart (working copy)
@@ -106,7 +106,7 @@
* file is created.
*
* FileMode.APPEND: same as FileMode.WRITE except that the file is
- * not truncated.
+ * not truncated and the position is set to the end of the file.
*
* By default mode is FileMode.READ.
*/
@@ -135,8 +135,18 @@
* Creates a new independent output stream for the file. The file
* output stream must be closed when no longer used to free up
* system resources.
+ *
+ * An output stream can be opened in two modes:
+ *
+ * FileMode.WRITE: create the stream and truncate the underlying
+ * file to length zero.
+ *
+ * FileMode.APPEND: create the stream and set the position to the end of
+ * the underlying file.
+ *
+ * By default the mode is FileMode.WRITE.
*/
- OutputStream openOutputStream();
+ OutputStream openOutputStream([FileMode mode]);
/**
* Get the name of the file.
« no previous file with comments | « no previous file | runtime/bin/file_impl.dart » ('j') | runtime/bin/file_linux.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698