| author | |
| committer | |
| log | b2610649fcf43c678fd81f3bef71f3ba42ee3606 |
| tree | b4184fd7bbcff7b84e8edd8949cf259d4856672d |
| parent | d978fdaa67f087cd17a122fec9ce65eabf9053ea |
| signature |
Adds a birthtime function to the `Stat` structs of Unices which support this. This is done to match the `atime`, `mtime`, and `ctime` functions.4 files changed, 16 insertions(+), 0 deletions(-)
lib/std/c/darwin.zig+4| ... | ... | @@ -395,6 +395,10 @@ pub const Stat = extern struct { |
| 395 | 395 | pub fn ctime(self: @This()) timespec { |
| 396 | 396 | return self.ctimespec; |
| 397 | 397 | } |
| 398 | ||
| 399 | pub fn birthtime(self: @This()) timespec { | |
| 400 | return self.birthtimespec; | |
| 401 | } | |
| 398 | 402 | }; |
| 399 | 403 | |
| 400 | 404 | pub const timespec = extern struct { |
lib/std/c/freebsd.zig+4| ... | ... | @@ -283,6 +283,10 @@ pub const Stat = extern struct { |
| 283 | 283 | pub fn ctime(self: @This()) timespec { |
| 284 | 284 | return self.ctim; |
| 285 | 285 | } |
| 286 | ||
| 287 | pub fn birthtime(self: @This()) timespec { | |
| 288 | return self.birthtim; | |
| 289 | } | |
| 286 | 290 | }; |
| 287 | 291 | |
| 288 | 292 | pub const timespec = extern struct { |
lib/std/c/netbsd.zig+4| ... | ... | @@ -312,6 +312,10 @@ pub const Stat = extern struct { |
| 312 | 312 | pub fn ctime(self: @This()) timespec { |
| 313 | 313 | return self.ctim; |
| 314 | 314 | } |
| 315 | ||
| 316 | pub fn birthtime(self: @This()) timespec { | |
| 317 | return self.birthtim; | |
| 318 | } | |
| 315 | 319 | }; |
| 316 | 320 | |
| 317 | 321 | pub const timespec = extern struct { |
lib/std/c/openbsd.zig+4| ... | ... | @@ -235,6 +235,10 @@ pub const Stat = extern struct { |
| 235 | 235 | pub fn ctime(self: @This()) timespec { |
| 236 | 236 | return self.ctim; |
| 237 | 237 | } |
| 238 | ||
| 239 | pub fn birthtime(self: @This()) timespec { | |
| 240 | return self.birthtim; | |
| 241 | } | |
| 238 | 242 | }; |
| 239 | 243 | |
| 240 | 244 | pub const timespec = extern struct { |