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 › fileHardLink Private Function fileHardLink Doc Source Private Function std.Io.Uring.fileHardLink
fn fileHardLink (
userdata : ?*anyopaque ,
file : File ,
new_dir : Dir ,
new_sub_path : []const u8 ,
options : File .HardLinkOptions ,
) File .HardLinkError !void Params userdata : ?*anyopaque file : File new_dir : Dir new_sub_path : []const u8 options : File .HardLinkOptions File Io/Uring.zig: 3991
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013 fn fileHardLink (
userdata : ?*anyopaque ,
file : File ,
new_dir : Dir ,
new_sub_path : []const u8 ,
options : File .HardLinkOptions ,
) File .HardLinkError !void {
const ev : *Evented = @ptrCast (@alignCast (userdata ));
var new_path_buffer : [PATH_MAX ]u8 = undefined ;
const new_sub_path_posix = try pathToPosix (new_sub_path , &new_path_buffer );
var cancel_region : CancelRegion = .init ();
defer cancel_region .deinit ();
return ev .linkat (
&cancel_region ,
file .handle ,
"" ,
new_dir .handle ,
new_sub_path_posix ,
linux .AT .EMPTY_PATH | @as (u32 , if (options .follow_symlinks ) linux .AT .SYMLINK_FOLLOW else 0 ),
);
}