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 › posix › name_to_handle_atZ Public Function name_to_handle_atZ Doc Source Public Function std.posix.name_to_handle_atZ
pub fn name_to_handle_atZ (
dirfd : fd_t ,
pathname_z : [*:0 ]const u8 ,
handle : *std .os .linux .file_handle ,
mount_id : *i32 ,
flags : u32 ,
) NameToFileHandleAtError !void Params Errors FileNotFound NotDir OperationUnsupported NameTooLong Unexpected File posix.zig: 1644
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661 pub fn name_to_handle_atZ (
dirfd : fd_t ,
pathname_z : [*:0 ]const u8 ,
handle : *std .os .linux .file_handle ,
mount_id : *i32 ,
flags : u32 ,
) NameToFileHandleAtError !void {
switch (errno (system .name_to_handle_at (dirfd , pathname_z , handle , mount_id , flags ))) {
.SUCCESS => {},
.FAULT => unreachable , // pathname, mount_id, or handle outside accessible address space
.INVAL => unreachable , // bad flags, or handle_bytes too big
.NOENT => return error .FileNotFound ,
.NOTDIR => return error .NotDir ,
.OPNOTSUPP => return error .OperationUnsupported ,
.OVERFLOW => return error .NameTooLong ,
else => |err | return unexpectedErrno (err ),
}
}