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 › os › uefi › protocol › file › File › open Public Function open Doc Source Public Function std.os.uefi.protocol.file.File.open
pub fn open (
self : *const File ,
file_name : [*:0 ]const u16 ,
mode : OpenMode ,
create_attributes : Attributes ,
) OpenError !*File Params File os/uefi/protocol/file.zig: 80
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107 pub fn open (
self : *const File ,
file_name : [*:0 ]const u16 ,
mode : OpenMode ,
create_attributes : Attributes ,
) OpenError !*File {
var new : *File = undefined ;
switch (self ._open (
self ,
&new ,
file_name ,
mode ,
create_attributes ,
)) {
.success => return new ,
.not_found => return error .NotFound ,
.no_media => return error .NoMedia ,
.media_changed => return error .MediaChanged ,
.device_error => return error .DeviceError ,
.volume_corrupted => return error .VolumeCorrupted ,
.write_protected => return error .WriteProtected ,
.access_denied => return error .AccessDenied ,
.out_of_resources => return error .OutOfResources ,
.volume_full => return error .VolumeFull ,
.invalid_parameter => return error .InvalidParameter ,
else => |status | return uefi .unexpectedStatus (status ),
}
}