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 › dirCreateDirPathOpenWasi Private Function dirCreateDirPathOpenWasi Doc Source Private Function std.Io.Threaded.dirCreateDirPathOpenWasi
fn dirCreateDirPathOpenWasi (
userdata : ?*anyopaque ,
dir : Dir ,
sub_path : []const u8 ,
permissions : Dir .Permissions ,
options : Dir .OpenOptions ,
) Dir .CreateDirPathOpenError !Dir Params userdata : ?*anyopaque dir : Dir sub_path : []const u8 permissions : Dir .Permissions options : Dir .OpenOptions File Io/Threaded.zig: 3677
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693 fn dirCreateDirPathOpenWasi (
userdata : ?*anyopaque ,
dir : Dir ,
sub_path : []const u8 ,
permissions : Dir .Permissions ,
options : Dir .OpenOptions ,
) Dir .CreateDirPathOpenError !Dir {
const t : *Threaded = @ptrCast (@alignCast (userdata ));
const t_io = io (t );
return dirOpenDirWasi (t , dir , sub_path , options ) catch |err | switch (err ) {
error .FileNotFound => {
_ = try dir .createDirPathStatus (t_io , sub_path , permissions );
return dirOpenDirWasi (t , dir , sub_path , options );
},
else => |e | return e ,
};
}