pub const Stat = extern struct dev: dev_tThe inode's device.
ino: ino_tThe inode's number.
nlink: nlink_tNumber of hard links.
mode: mode_tInode protection mode.
__pad0: i16uid: uid_tUser ID of the file's owner.
gid: gid_tGroup ID of the file's group.
__pad1: i32rdev: dev_tDevice type.
atim: timespecTime of last access.
mtim: timespecTime of last data modification.
ctim: timespecTime of last file status change.
birthtim: timespecTime of file creation.
size: off_tFile size, in bytes.
blocks: blkcnt_tBlocks allocated for file.
blksize: blksize_tOptimal blocksize for I/O.
flags: fflags_tUser defined flags for file.
gen: u64File generation number.
__spare: [10]u6485
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137pub const Stat = extern struct {
/// The inode's device.
dev: dev_t,
/// The inode's number.
ino: ino_t,
/// Number of hard links.
nlink: nlink_t,
/// Inode protection mode.
mode: mode_t,
__pad0: i16,
/// User ID of the file's owner.
uid: uid_t,
/// Group ID of the file's group.
gid: gid_t,
__pad1: i32,
/// Device type.
rdev: dev_t,
/// Time of last access.
atim: timespec,
/// Time of last data modification.
mtim: timespec,
/// Time of last file status change.
ctim: timespec,
/// Time of file creation.
birthtim: timespec,
/// File size, in bytes.
size: off_t,
/// Blocks allocated for file.
blocks: blkcnt_t,
/// Optimal blocksize for I/O.
blksize: blksize_t,
/// User defined flags for file.
flags: fflags_t,
/// File generation number.
gen: u64,
__spare: [10]u64,
pub fn atime(self: @This()) timespec {
return self.atim;
}
pub fn mtime(self: @This()) timespec {
return self.mtim;
}
pub fn ctime(self: @This()) timespec {
return self.ctim;
}
pub fn birthtime(self: @This()) timespec {
return self.birthtim;
}
}