| ... | @@ -41,32 +41,20 @@ pub const Stat = extern struct { | ... | @@ -41,32 +41,20 @@ pub const Stat = extern struct { |
| 41 | blksize: i32, | 41 | blksize: i32, |
| 42 | blocks: i64, | 42 | blocks: i64, |
| 43 | | 43 | |
| 44 | atimesec: time_t, | 44 | atim: timespec, |
| 45 | atimensec: isize, | 45 | mtim: timespec, |
| 46 | mtimesec: time_t, | 46 | ctim: timespec, |
| 47 | mtimensec: isize, | | |
| 48 | ctimesec: time_t, | | |
| 49 | ctimensec: isize, | | |
| 50 | | 47 | |
| 51 | pub fn atime(self: @This()) timespec { | 48 | pub fn atime(self: @This()) timespec { |
| 52 | return timespec{ | 49 | return self.atim; |
| 53 | .tv_sec = self.atimesec, | | |
| 54 | .tv_nsec = self.atimensec, | | |
| 55 | }; | | |
| 56 | } | 50 | } |
| 57 | | 51 | |
| 58 | pub fn mtime(self: @This()) timespec { | 52 | pub fn mtime(self: @This()) timespec { |
| 59 | return timespec{ | 53 | return self.mtim; |
| 60 | .tv_sec = self.mtimesec, | | |
| 61 | .tv_nsec = self.mtimensec, | | |
| 62 | }; | | |
| 63 | } | 54 | } |
| 64 | | 55 | |
| 65 | pub fn ctime(self: @This()) timespec { | 56 | pub fn ctime(self: @This()) timespec { |
| 66 | return timespec{ | 57 | return self.ctim; |
| 67 | .tv_sec = self.ctimesec, | | |
| 68 | .tv_nsec = self.ctimensec, | | |
| 69 | }; | | |
| 70 | } | 58 | } |
| 71 | }; | 59 | }; |
| 72 | | 60 | |