Text_File_Handler module

start_file

procedure · 1 overloadSource

Starts reading the file at full_path. The file is read whole into memory, owned by the handler and freed by deinit.

start_file :: (
    handler: *Text_File_Handler,
    short_name: string,
    full_path: string,
    optional := false,
    loc := #caller_location
)

Anything the handler held before is released and failed is cleared. When the file cannot be read, failed is set and an error is logged, unless optional is set: then the handler is simply empty and does not fail. The version header is checked as in start_from_memory.

Parameters

short_name: string
full_path: string
optional := false
loc := #caller_location

See also