#6368·tokio

Add tokio version of `std::fs::File::set_times`

Author: arpankapoorCreated Feb 27, 2024Updated Sep 26, 2026
LabelsA-tokioM-fsC-feature-request

Is your feature request related to a problem? Please describe. Need async functions to set file times.

Describe the solution you'd like Add tokio versions of std::fs::File::set_times and std::fs::File::set_modified.

Describe alternatives you've considered Either reopen the file using std::fs::File and use set_times or use the filetime crate on the path.

Additional context The std versions were introduced in 1.75 and I see that the current tokio MSRV is 1.63. I'm guessing using something like rustversion for conditional compilation would be a no go? Is there any other way to add this besides waiting until the MSRV reaches 1.75?