File module

Map_File_Info

structSource

A whole file's bytes, as map_entire_file_start returns them: data is the content, and the record must go back to map_entire_file_end.

On Windows the bytes are a read-only view of the file (map_info holds the mapping) and writing to them faults; elsewhere they are a copy in memory from context.allocator. Code should treat data as read-only on both.

Fields

data: string

See also