pub const Stat = struct inode: INodeA number that the system uses to point to the file metadata. This number is not guaranteed to be unique across time, as some file systems may reuse an inode after its file has been deleted. Some systems may change the inode of a file over time.
On Linux, the inode is a structure that stores the metadata, and the inode number is what you see here: the index number of the inode.
The FileIndex on Windows is similar. It is a number for a file that is unique to each filesystem.
nlink: NLinksize: u64permissions: Permissionskind: Kindatime: ?Io.TimestampLast access time in nanoseconds, relative to UTC 1970-01-01.
Filesystems generally find this value problematic to keep updated since it turns read-only file system accesses into file system mutations. Some systems report stale values, and some systems explicitly refuse to report this value. The latter case is handled by null.
mtime: Io.TimestampLast modification time in nanoseconds, relative to UTC 1970-01-01.
ctime: Io.TimestampLast status/metadata change time in nanoseconds, relative to UTC 1970-01-01.
block_size: BlockSizeSmallest chunk length in bytes appropriate for optimal I/O. This will be set to 1 for operating systems or file systems that do not recognize this concept. Not always a power of two.
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89pub const Stat = struct {
/// A number that the system uses to point to the file metadata. This
/// number is not guaranteed to be unique across time, as some file
/// systems may reuse an inode after its file has been deleted. Some
/// systems may change the inode of a file over time.
///
/// On Linux, the inode is a structure that stores the metadata, and
/// the inode _number_ is what you see here: the index number of the
/// inode.
///
/// The FileIndex on Windows is similar. It is a number for a file that
/// is unique to each filesystem.
inode: INode,
nlink: NLink,
size: u64,
permissions: Permissions,
kind: Kind,
/// Last access time in nanoseconds, relative to UTC 1970-01-01.
///
/// Filesystems generally find this value problematic to keep updated since
/// it turns read-only file system accesses into file system mutations.
/// Some systems report stale values, and some systems explicitly refuse to
/// report this value. The latter case is handled by `null`.
atime: ?Io.Timestamp,
/// Last modification time in nanoseconds, relative to UTC 1970-01-01.
mtime: Io.Timestamp,
/// Last status/metadata change time in nanoseconds, relative to UTC 1970-01-01.
ctime: Io.Timestamp,
/// Smallest chunk length in bytes appropriate for optimal I/O. This will
/// be set to `1` for operating systems or file systems that do not
/// recognize this concept. Not always a power of two.
block_size: BlockSize,
}