authorgravatar for 37453713+ominitay@users.noreply.github.comominitay <37453713+ominitay@users.noreply.github.com> 2022-01-08 21:19:35+00:00
committergravatar for 37453713+ominitay@users.noreply.github.comominitay <37453713+ominitay@users.noreply.github.com> 2022-02-13 20:40:45+00:00
logb2610649fcf43c678fd81f3bef71f3ba42ee3606
treeb4184fd7bbcff7b84e8edd8949cf259d4856672d
parentd978fdaa67f087cd17a122fec9ce65eabf9053ea
signaturelock-open Commit is signed but in an unrecognized format.

std.c.*: add birthtime function to Stat

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 {
395395 pub fn ctime(self: @This()) timespec {
396396 return self.ctimespec;
397397 }
398
399 pub fn birthtime(self: @This()) timespec {
400 return self.birthtimespec;
401 }
398402};
399403
400404pub const timespec = extern struct {
lib/std/c/freebsd.zig+4
......@@ -283,6 +283,10 @@ pub const Stat = extern struct {
283283 pub fn ctime(self: @This()) timespec {
284284 return self.ctim;
285285 }
286
287 pub fn birthtime(self: @This()) timespec {
288 return self.birthtim;
289 }
286290};
287291
288292pub const timespec = extern struct {
lib/std/c/netbsd.zig+4
......@@ -312,6 +312,10 @@ pub const Stat = extern struct {
312312 pub fn ctime(self: @This()) timespec {
313313 return self.ctim;
314314 }
315
316 pub fn birthtime(self: @This()) timespec {
317 return self.birthtim;
318 }
315319};
316320
317321pub const timespec = extern struct {
lib/std/c/openbsd.zig+4
......@@ -235,6 +235,10 @@ pub const Stat = extern struct {
235235 pub fn ctime(self: @This()) timespec {
236236 return self.ctim;
237237 }
238
239 pub fn birthtime(self: @This()) timespec {
240 return self.birthtim;
241 }
238242};
239243
240244pub const timespec = extern struct {