Function getInfoSize [src]

Prototype

pub fn getInfoSize(self: *const File, comptime info: std.meta.Tag(Info)) GetInfoError!usize

Parameters

self: *const Fileinfo: std.meta.Tag(Info)

Possible Errors

BufferTooSmall
DeviceError GetInfoSizeError
NoMedia GetInfoSizeError
Unexpected UnexpectedError
Unsupported GetInfoSizeError
VolumeCorrupted GetInfoSizeError

Source

pub fn getInfoSize(self: *const File, comptime info: std.meta.Tag(Info)) GetInfoError!usize { const InfoType = @FieldType(Info, @tagName(info)); var len: usize = 0; switch (self._get_info(self, &InfoType.guid, &len, null)) { .success, .buffer_too_small => return len, .unsupported => return Error.Unsupported, .no_media => return Error.NoMedia, .device_error => return Error.DeviceError, .volume_corrupted => return Error.VolumeCorrupted, else => |status| return uefi.unexpectedStatus(status), } }