mirror of
https://github.com/ziglang/zig.git
synced 2026-01-20 14:25:16 +00:00
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.
This commit is contained in:
parent
d978fdaa67
commit
b2610649fc
@ -395,6 +395,10 @@ pub const Stat = extern struct {
|
||||
pub fn ctime(self: @This()) timespec {
|
||||
return self.ctimespec;
|
||||
}
|
||||
|
||||
pub fn birthtime(self: @This()) timespec {
|
||||
return self.birthtimespec;
|
||||
}
|
||||
};
|
||||
|
||||
pub const timespec = extern struct {
|
||||
|
||||
@ -283,6 +283,10 @@ pub const Stat = extern struct {
|
||||
pub fn ctime(self: @This()) timespec {
|
||||
return self.ctim;
|
||||
}
|
||||
|
||||
pub fn birthtime(self: @This()) timespec {
|
||||
return self.birthtim;
|
||||
}
|
||||
};
|
||||
|
||||
pub const timespec = extern struct {
|
||||
|
||||
@ -312,6 +312,10 @@ pub const Stat = extern struct {
|
||||
pub fn ctime(self: @This()) timespec {
|
||||
return self.ctim;
|
||||
}
|
||||
|
||||
pub fn birthtime(self: @This()) timespec {
|
||||
return self.birthtim;
|
||||
}
|
||||
};
|
||||
|
||||
pub const timespec = extern struct {
|
||||
|
||||
@ -235,6 +235,10 @@ pub const Stat = extern struct {
|
||||
pub fn ctime(self: @This()) timespec {
|
||||
return self.ctim;
|
||||
}
|
||||
|
||||
pub fn birthtime(self: @This()) timespec {
|
||||
return self.birthtim;
|
||||
}
|
||||
};
|
||||
|
||||
pub const timespec = extern struct {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user