Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion library/std/src/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1111,6 +1111,10 @@ impl File {
/// `futimes` on macOS before 10.13) and the `SetFileTime` function on Windows. Note that this
/// [may change in the future][changes].
///
/// On most platforms, including UNIX and Windows platforms, this function can also change the
/// timestamps of a directory. To do so, open the directory with `File::open`, without
/// attempting to obtain write permission.
///
/// [changes]: io#platform-specific-behavior
///
/// # Errors
Expand All @@ -1128,7 +1132,7 @@ impl File {
/// use std::fs::{self, File, FileTimes};
///
/// let src = fs::metadata("src")?;
/// let dest = File::options().write(true).open("dest")?;
/// let dest = File::open("dest")?;
/// let times = FileTimes::new()
/// .set_accessed(src.accessed()?)
/// .set_modified(src.modified()?);
Expand Down
Loading