const std = @import("std"); const sys = @import("./sys.zig"); /// /// An entry block of an Oar archive file. /// /// Typically, following this block in memory is the file data it holds the meta-information for. /// pub const Entry = extern struct { signature: [3]u8 = signature_magic, revision: u8, name_buffer: [255]u8 = std.mem.zeroes([255]u8), name_length: u8 = 0, file_size: u64, file_offset: u64, padding: [232]u8 = std.mem.zeroes([232]u8), comptime { const entry_size = @sizeOf(Entry); if (entry_size != 512) @compileError("Entry is " ++ std.fmt.comptimePrint("{d}", .{entry_size}) ++ " bytes"); } /// /// /// pub const FindError = sys.FileAccess.Error || error { EntryNotFound, }; /// /// /// pub fn find(file_access: sys.FileAccess, entry_name: []const u8) FindError!Entry { _ = file_access; _ = entry_name; return error.EntryNotFound; } /// /// Magic identifier used to validate [Entry] data. /// const signature_magic = [3]u8{'o', 'a', 'r'}; };