Zig 0.17.0-dev (Split by item)

Shortcut keys
?
Show these tips
S
Focus search field
Esc
Clear focus & close tips
U
Jump to source code
↑
Move up in search results
↓
Move down in search results
↵
Go to active search result
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. Public Function

read

Public Function
std.os.uefi.protocol.file.File.read
pub fn read(self: *File, buffer: []u8) ReadError!usize

If self is a directory entry and buffer is too small to contain the next entry, this function returns Error.BufferTooSmall. You can call readSize before or after to determine how big the buffer should be to call this function.

Params

  • self: *File
  • buffer: []u8

File

os/uefi/protocol/file.zig:144
144
145
146
147
148
149
150
151
152
153
154
    pub fn read(self: *File, buffer: []u8) ReadError!usize {
        var size: usize = buffer.len;
        switch (self._read(self, &size, buffer.ptr)) {
            .success => return size,
            .no_media => return error.NoMedia,
            .device_error => return error.DeviceError,
            .volume_corrupted => return error.VolumeCorrupted,
            .buffer_too_small => return error.BufferTooSmall,
            else => |status| return uefi.unexpectedStatus(status),
        }
    }