SDL_LoadFile

Load all the data from a file path.

The data is allocated with a zero byte at the end (null terminated) for convenience. This extra byte is not included in the value reported via datasize.

The data should be freed with SDL_free().

extern (C) nothrow @nogc extern
void*
SDL_LoadFile
(
const(char)* file
,
size_t* datasize
)

Parameters

file const(char)*

the path to read all available data from.

datasize size_t*

if not NULL, will store the number of bytes read.

Return Value

Type: void*

the data or NULL on failure; call SDL_GetError() for more information.

Threadsafety: This function is not thread safe.

See Also

Meta