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 › Threaded › dirRenamePosix Private Function dirRenamePosix Doc Source Private Function std.Io.Threaded.dirRenamePosix
fn dirRenamePosix (
userdata : ?*anyopaque ,
old_dir : Dir ,
old_sub_path : []const u8 ,
new_dir : Dir ,
new_sub_path : []const u8 ,
) Dir .RenameError !void Params userdata : ?*anyopaque old_dir : Dir old_sub_path : []const u8 new_dir : Dir new_sub_path : []const u8 File Io/Threaded.zig: 7805
7805
7806
7807
7808
7809
7810
7811
7812
7813
7814
7815
7816
7817
7818
7819
7820
7821
7822 fn dirRenamePosix (
userdata : ?*anyopaque ,
old_dir : Dir ,
old_sub_path : []const u8 ,
new_dir : Dir ,
new_sub_path : []const u8 ,
) Dir .RenameError !void {
const t : *Threaded = @ptrCast (@alignCast (userdata ));
_ = t ;
var old_path_buffer : [posix .PATH_MAX ]u8 = undefined ;
var new_path_buffer : [posix .PATH_MAX ]u8 = undefined ;
const old_sub_path_posix = try pathToPosix (old_sub_path , &old_path_buffer );
const new_sub_path_posix = try pathToPosix (new_sub_path , &new_path_buffer );
return renameat (old_dir .handle , old_sub_path_posix , new_dir .handle , new_sub_path_posix );
}