FileReadCallback

Last Updated2026-07-30
Created At2026-07-30

Called when an asynchronous whole-file read completes. contents contains the raw file bytes. It is binary-safe, including embedded NUL bytes, and its length is given by size. Do not use string-focused natives on it unless the data is known to be a string.

void (FileOpResult result, const char[] path, const char[] contents, int size, any data)

Parameters

Operation result.
const char[] path
Path supplied to the operation.
const char[] contents
Raw-byte buffer.
int size
Number of file bytes in contents.
any data
User data supplied to the operation.

Return Value

void