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.c.freebsd.Stat
pub const Stat = extern struct

Fields

dev: dev_t

The inode's device.

ino: ino_t

The inode's number.

nlink: nlink_t

Number of hard links.

mode: mode_t

Inode protection mode.

__pad0: i16
uid: uid_t

User ID of the file's owner.

gid: gid_t

Group ID of the file's group.

__pad1: i32
rdev: dev_t

Device type.

atim: timespec

Time of last access.

mtim: timespec

Time of last data modification.

ctim: timespec

Time of last file status change.

birthtim: timespec

Time of file creation.

size: off_t

File size, in bytes.

blocks: blkcnt_t

Blocks allocated for file.

blksize: blksize_t

Optimal blocksize for I/O.

flags: fflags_t

User defined flags for file.

gen: u64

File generation number.

__spare: [10]u64

Functions

pub fn atime(self: @This()) timespec
pub fn mtime(self: @This()) timespec
pub fn ctime(self: @This()) timespec
pub fn birthtime(self: @This()) timespec

File

c/freebsd.zig:85
85
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
137
pub 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;
    }
}