Skip to content

Commit c4044ee

Browse files
Add note for append method in OpenOptions docs
1 parent ccd4689 commit c4044ee

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Diff for: src/libstd/fs.rs

+6
Original file line numberDiff line numberDiff line change
@@ -569,11 +569,17 @@ impl OpenOptions {
569569
/// end of the file. So, before writing, save the current position (using
570570
/// [`seek`]`(`[`SeekFrom`]`::`[`Current`]`(0))`, and restore it before the next read.
571571
///
572+
/// ## Note
573+
///
574+
/// This function doesn't create the file if it doesn't exist. Use the [`create`]
575+
/// method to do so.
576+
///
572577
/// [`write()`]: ../../std/fs/struct.File.html#method.write
573578
/// [`flush()`]: ../../std/fs/struct.File.html#method.flush
574579
/// [`seek`]: ../../std/fs/struct.File.html#method.seek
575580
/// [`SeekFrom`]: ../../std/io/enum.SeekFrom.html
576581
/// [`Current`]: ../../std/io/enum.SeekFrom.html#variant.Current
582+
/// [`create`]: #method.create
577583
///
578584
/// # Examples
579585
///

0 commit comments

Comments
 (0)