Skip to main content

write_resource_files_to_scratch

Function write_resource_files_to_scratch 

Source
pub unsafe fn write_resource_files_to_scratch(
    ptr: *mut u8,
    files: &[ResourceFile],
) -> Result<(), String>
Expand description

Write a list of resource files (index, relative path) to scratch. Format: magic (u32), count (u32), then for each entry: index (u32), length (u32) followed by UTF-8 bytes.

ยงSafety

ptr must point to a valid SHM allocation.