diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2017-09-13 14:47:50 +0200 |
|---|---|---|
| committer | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2017-09-13 14:47:50 +0200 |
| commit | c4044ee39a7da275dcbb3f382bda3d15a0e54f61 (patch) | |
| tree | 3bdd9e770e6f7f120e3c85f6df2c21193d366b78 | |
| parent | ccd4689ca3bb7742439255ee5a8411cd6103e8f0 (diff) | |
| download | rust-c4044ee39a7da275dcbb3f382bda3d15a0e54f61.tar.gz rust-c4044ee39a7da275dcbb3f382bda3d15a0e54f61.zip | |
Add note for append method in OpenOptions docs
| -rw-r--r-- | src/libstd/fs.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libstd/fs.rs b/src/libstd/fs.rs index 6014e765284..2a916b819cc 100644 --- a/src/libstd/fs.rs +++ b/src/libstd/fs.rs @@ -569,11 +569,17 @@ impl OpenOptions { /// end of the file. So, before writing, save the current position (using /// [`seek`]`(`[`SeekFrom`]`::`[`Current`]`(0))`, and restore it before the next read. /// + /// ## Note + /// + /// This function doesn't create the file if it doesn't exist. Use the [`create`] + /// method to do so. + /// /// [`write()`]: ../../std/fs/struct.File.html#method.write /// [`flush()`]: ../../std/fs/struct.File.html#method.flush /// [`seek`]: ../../std/fs/struct.File.html#method.seek /// [`SeekFrom`]: ../../std/io/enum.SeekFrom.html /// [`Current`]: ../../std/io/enum.SeekFrom.html#variant.Current + /// [`create`]: #method.create /// /// # Examples /// |
