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 library itself.
Zig › std/ › Io/ › Threaded.zig › ntReadFileResult
ntReadFileResult
Threaded.ntReadFileResult
fn ntReadFileResult (io_status_block : *const windows .IO_STATUS_BLOCK ) !usize
File
Code
fn ntReadFileResult (io_status_block : *const windows .IO_STATUS_BLOCK ) !usize {
switch (io_status_block .u .Status ) {
.PENDING => unreachable ,
.CANCELLED => unreachable ,
.SUCCESS => return io_status_block .Information ,
.END_OF_FILE , .PIPE_BROKEN => return error .EndOfStream ,
.INVALID_HANDLE => return error .NotOpenForReading ,
.INVALID_DEVICE_REQUEST => return error .IsDir ,
.FILE_LOCK_CONFLICT => return error .LockViolation ,
.ACCESS_DENIED => return error .AccessDenied ,
else => |status | return windows .unexpectedStatus (status ),
}
}