Skip to main content

set_time

Function set_time 

Source
pub(crate) fn set_time(path: &Path, when: SystemTime) -> Result<()>
Expand description

A file’s last change set to when, through a handle that cannot write it. On Windows, a handle on its attributes alone (FILE_WRITE_ATTRIBUTES): closing a handle that could write the file has the antivirus read it whole before the close returns, a quarter of a second and more for a note of 24 MB, under the exchanges’ lock when a put back dates it there (CI’s Windows job, 19 October 2026); an attribute’s handle is not scanned. Elsewhere a read handle: the owner sets its times (futimens); where a file system asks for write access to set them, a write handle after all.