Zig 0.17.0-dev (Split by item) 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.
std › Io › Uring › fchownat Private Function fchownat Doc Source Private Function std.Io.Uring.fchownat
fn fchownat (
ev : *Evented ,
sync : *CancelRegion .Sync ,
dir : fd_t ,
path : [*:0 ]const u8 ,
owner : linux .uid_t ,
group : linux .gid_t ,
flags : u32 ,
) File .SetOwnerError !void Params File Io/Uring.zig: 5419
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448 fn fchownat (
ev : *Evented ,
sync : *CancelRegion .Sync ,
dir : fd_t ,
path : [*:0 ]const u8 ,
owner : linux .uid_t ,
group : linux .gid_t ,
flags : u32 ,
) File .SetOwnerError !void {
_ = ev ;
while (true ) {
try sync .cancel_region .await (.nothing );
switch (linux .errno (linux .fchownat (dir , path , owner , group , flags ))) {
.SUCCESS => return ,
.INTR => {},
.BADF => |err | return errnoBug (err ), // likely fd refers to directory opened without `Dir.OpenOptions.iterate`
.FAULT => |err | return errnoBug (err ),
.INVAL => |err | return errnoBug (err ),
.ACCES => return error .AccessDenied ,
.IO => return error .InputOutput ,
.LOOP => return error .SymLinkLoop ,
.NOENT => return error .FileNotFound ,
.NOMEM => return error .SystemResources ,
.NOTDIR => return error .FileNotFound ,
.PERM => return error .PermissionDenied ,
.ROFS => return error .ReadOnlyFileSystem ,
else => |err | return unexpectedErrno (err ),
}
}
}