| ... | ... | @@ -269,9 +269,17 @@ pub const File = struct { |
| 269 | 269 | |
| 270 | 270 | pub const UpdateTimesError = os.FutimensError || windows.SetFileTimeError; |
| 271 | 271 | |
| 272 | | /// `atime`: access timestamp in nanoseconds |
| 273 | | /// `mtime`: last modification timestamp in nanoseconds |
| 274 | | pub fn updateTimes(self: File, atime: i64, mtime: i64) UpdateTimesError!void { |
| 272 | /// The underlying file system may have a different granularity than nanoseconds, |
| 273 | /// and therefore this function cannot guarantee any precision will be stored. |
| 274 | /// Further, the maximum value is limited by the system ABI. When a value is provided |
| 275 | /// that exceeds this range, the value is clamped to the maximum. |
| 276 | pub fn updateTimes( |
| 277 | self: File, |
| 278 | /// access timestamp in nanoseconds |
| 279 | atime: i64, |
| 280 | /// last modification timestamp in nanoseconds |
| 281 | mtime: i64, |
| 282 | ) UpdateTimesError!void { |
| 275 | 283 | if (windows.is_the_target) { |
| 276 | 284 | const atime_ft = windows.nanoSecondsToFileTime(atime); |
| 277 | 285 | const mtime_ft = windows.nanoSecondsToFileTime(mtime); |