Function SDL_SaveFile_IO

pub unsafe extern "C" fn SDL_SaveFile_IO(
    src: *mut SDL_IOStream,
    data: *const c_void,
    datasize: usize,
    closeio: bool,
) -> bool
Available on crate feature dep_sdl3 only.
Expand description

Save all the data into an SDL data stream.

§Parameters

  • src: the SDL_IOStream to write all data to.
  • data: the data to be written. If datasize is 0, may be NULL or a invalid pointer.
  • datasize: the number of bytes to be written.
  • closeio: if true, calls SDL_CloseIO() on src before returning, even in the case of an error.

§Return value

Returns true on success or false on failure; call SDL_GetError() for more information.

§Thread safety

This function is not thread safe.

§Availability

This function is available since SDL 3.2.0.

§See also