Zig 0.17.0-dev (Split by item)

Shortcut keys
?
Show these tips
S
Focus search field
Esc
Clear focus & close tips
U
Jump to source code
↑
Move up in search results
↓
Move down in search results
↵
Go to active search result
This is an example of documentation generated by ZigDoc, an alternative to Zig's built-in Auto Doc feature. See also examples in other modes/formats. The project being documented here (as the example) is the Zig standard library. Public Struct

Stat

Public Struct
std.Io.File.Stat
pub const Stat = struct

Fields

inode: INode

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.

nlink: NLink
size: u64
permissions: Permissions
kind: Kind
atime: ?Io.Timestamp

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.

mtime: Io.Timestamp

Last modification time in nanoseconds, relative to UTC 1970-01-01.

ctime: Io.Timestamp

Last status/metadata change time in nanoseconds, relative to UTC 1970-01-01.

block_size: BlockSize

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.

File

Io/File.zig:57
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
89
pub 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,
}