Skip to content

Commit 0f50aea

Browse files
committed
Hint that the user might still want to append in a single write.
1 parent 1440716 commit 0f50aea

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

library/std/src/fs.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -982,7 +982,10 @@ impl OpenOptions {
982982
/// single `write()` call depends on the operating system and file system. A
983983
/// successful `write()` is allowed to write only part of the given data, so even if
984984
/// you're careful to provide the whole message in a single call to `write()`, there
985-
/// is no guarantee that it will written out in full.
985+
/// is no guarantee that it will written out in full. If you rely on the filesystem
986+
/// accepting the message in a single write, make sure that all data that belongs
987+
/// together is written in one operation. This can be done by concatenating strings
988+
/// before passing them to [`write()`].
986989
///
987990
/// If a file is opened with both read and append access, beware that after
988991
/// opening, and after every write, the position for reading may be set at the

0 commit comments

Comments
 (0)