Skip to content

Commit a16e0e2

Browse files
committed
Add note about append not implying write
Hopefully this will reduce the kind of confusion @joelmccracken repots in http://joelmccracken.github.io/entries/a-simple-web-app-in-rust-pt-2b/
1 parent 4e14ef0 commit a16e0e2

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/libstd/fs.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -422,6 +422,11 @@ impl OpenOptions {
422422
/// This option, when true, means that writes will append to a file instead
423423
/// of overwriting previous contents.
424424
///
425+
/// Note that this isn't the same as `write` with the cursor starting at
426+
/// the end of the file; this mode only allows writing to the end of the
427+
/// file, but not changing any of its previous contents. This is common for
428+
/// things like log files.
429+
///
425430
/// # Examples
426431
///
427432
/// ```no_run

0 commit comments

Comments
 (0)