Skip to content

Commit

Permalink
Clarify interfaction between File::set_len and file cursor
Browse files Browse the repository at this point in the history
  • Loading branch information
jethrogb authored Feb 23, 2018
1 parent 063deba commit cfad25e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/libstd/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,10 @@ impl File {
/// will be extended to `size` and have all of the intermediate data filled
/// in with 0s.
///
/// The file's cursor isn't changed. In particular, if the cursor was at the
/// end and the file is shrunk using this operation, the cursor will now be
/// past the end.
///
/// # Errors
///
/// This function will return an error if the file is not opened for writing.
Expand Down

0 comments on commit cfad25e

Please sign in to comment.