SDL_LoadFile_IO

Load all the data from an SDL data stream.

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_IO

Parameters

src SDL_IOStream*

the SDL_IOStream to read all available data from.

datasize size_t*

a pointer filled in with the number of bytes read, may be NULL.

closeio bool

if true, calls SDL_CloseIO() on src before returning, even in the case of an error.

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