sdlSaveFileIo function iostream
Save all the data into an SDL data stream.
\param src the SDL_IOStream to write all data to.
\param data the data to be written. If datasize is 0, may be NULL or a
invalid pointer.
\param datasize the number of bytes to be written.
\param closeio if true, calls SDL_CloseIO() on src before returning, even
in the case of an error.
\returns true on success or false on failure; call SDL_GetError() for more
information.
\threadsafety Do not use the same SDL_IOStream from two threads at once.
\since This function is available since SDL 3.2.0.
\sa SDL_SaveFile \sa SDL_LoadFile_IO
extern SDL_DECLSPEC bool SDLCALL SDL_SaveFile_IO(SDL_IOStream *src, const void *data, size_t datasize, bool closeio)
Implementation
bool sdlSaveFileIo(
Pointer<SdlIoStream> src,
Pointer<Void> data,
int datasize,
bool closeio,
) {
final sdlSaveFileIoLookupFunction = _libSdl
.lookupFunction<
Bool Function(
Pointer<SdlIoStream> src,
Pointer<Void> data,
Size datasize,
Bool closeio,
),
bool Function(
Pointer<SdlIoStream> src,
Pointer<Void> data,
int datasize,
bool closeio,
)
>('SDL_SaveFile_IO');
return sdlSaveFileIoLookupFunction(src, data, datasize, closeio);
}