| ... | ... | @@ -315,11 +315,11 @@ pub const Stat = struct { |
| 315 | 315 | mode: Mode, |
| 316 | 316 | kind: Kind, |
| 317 | 317 | |
| 318 | | /// Access time in nanoseconds, relative to UTC 1970-01-01. |
| 318 | /// Last access time in nanoseconds, relative to UTC 1970-01-01. |
| 319 | 319 | atime: i128, |
| 320 | 320 | /// Last modification time in nanoseconds, relative to UTC 1970-01-01. |
| 321 | 321 | mtime: i128, |
| 322 | | /// Creation time in nanoseconds, relative to UTC 1970-01-01. |
| 322 | /// Last status/metadata change time in nanoseconds, relative to UTC 1970-01-01. |
| 323 | 323 | ctime: i128, |
| 324 | 324 | |
| 325 | 325 | pub fn fromSystem(st: posix.system.Stat) Stat { |
| ... | ... | @@ -369,6 +369,8 @@ pub const Stat = struct { |
| 369 | 369 | |
| 370 | 370 | pub const StatError = posix.FStatError; |
| 371 | 371 | |
| 372 | /// Returns `Stat` containing basic information about the `File`. |
| 373 | /// Use `metadata` to retrieve more detailed information (e.g. creation time, permissions). |
| 372 | 374 | /// TODO: integrate with async I/O |
| 373 | 375 | pub fn stat(self: File) StatError!Stat { |
| 374 | 376 | if (builtin.os.tag == .windows) { |
| ... | ... | @@ -392,7 +394,7 @@ pub fn stat(self: File) StatError!Stat { |
| 392 | 394 | .kind = if (info.StandardInformation.Directory == 0) .file else .directory, |
| 393 | 395 | .atime = windows.fromSysTime(info.BasicInformation.LastAccessTime), |
| 394 | 396 | .mtime = windows.fromSysTime(info.BasicInformation.LastWriteTime), |
| 395 | | .ctime = windows.fromSysTime(info.BasicInformation.CreationTime), |
| 397 | .ctime = windows.fromSysTime(info.BasicInformation.ChangeTime), |
| 396 | 398 | }; |
| 397 | 399 | } |
| 398 | 400 | |