rust icon indicating copy to clipboard operation
rust copied to clipboard

Add freeze file times on Windows

Open tguichaoua opened this issue 1 month ago • 3 comments

This PR add two new methods on OpenOptionsExt in order to not change the "last access time" and "last write time" of the file on Windows.

  • Tracking Issue: https://github.com/rust-lang/rust/issues/149715
  • ACP: https://github.com/rust-lang/libs-team/issues/708

tguichaoua avatar Dec 06 '25 15:12 tguichaoua

r? @ChrisDenton

rustbot has assigned @ChrisDenton. They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

rustbot avatar Dec 06 '25 15:12 rustbot

The job pr-check-1 failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)

error[E0624]: method `freeze_last_access_time` is private
   --> library/std/src/os/windows/fs.rs:348:29
    |
348 |         self.as_inner_mut().freeze_last_access_time(freeze);
    |                             ^^^^^^^^^^^^^^^^^^^^^^^ private method
    |
   ::: library/std/src/sys/fs/windows.rs:253:5
    |
253 |     fn freeze_last_access_time(&mut self, freeze: bool) {
    |     --------------------------------------------------- private method defined here

error[E0624]: method `freeze_last_write_time` is private
   --> library/std/src/os/windows/fs.rs:353:29
    |
353 |         self.as_inner_mut().freeze_last_write_time(freeze);
    |                             ^^^^^^^^^^^^^^^^^^^^^^ private method
    |
   ::: library/std/src/sys/fs/windows.rs:256:5
    |
256 |     fn freeze_last_write_time(&mut self, freeze: bool) {

rust-log-analyzer avatar Dec 06 '25 16:12 rust-log-analyzer

The job pr-check-1 failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)

rust-log-analyzer avatar Dec 06 '25 16:12 rust-log-analyzer