SDL_WriteStorageFile(3)

πŸ’– NAME πŸ’–

okay bestie, welcome to SDL_WriteStorageFile(3) β€” yes, that's the page name, and it's living in the SDL3 FUNCTIONS manual. So what's the vibe? SDL_WriteStorageFile β€” Synchronously write a file from client memory into a storage container. It's giving "write these bytes right now, no async detours," periodt. πŸ’…


✨ SYNOPSIS ✨

#include <SDL3/SDL_storage.h>

bool SDL_WriteStorageFile(SDL_Storage *storage, const char *path, const void *source, Uint64 length);

πŸŽ€ FUNCTION PARAMETERS πŸŽ€

  • storage β€” a storage container to write to. Like, the container that's receiving the file, bestie. 🫢
  • path β€” the relative path of the file to write. Relative, okay? iykyk.
  • source β€” a client-provided buffer to write from. This is where the bytes are coming from.
  • length β€” the length of the source buffer. Count those bytes, fr fr. πŸ”₯

🌈 RETURN VALUE 🌈

It returns true if the file was written or false on failure. If it's a fail, call SDL_GetError() for more information. That's the tea. 😭


⭐ AVAILABILITY ⭐

This function is available since SDL 3.2.0. So if you're on something older, it's giving "not yet, bestie." πŸ’€


πŸ¦‹ SEE ALSO πŸ¦‹


Bye bestie! Footer tea: source is Simple Directmedia Layer, version is SDL 3.4.18, page is SDL_WriteStorageFile(3) β€” and the date? Not on this footer, but the vibe is eternal. πŸ’–βœ¨

πŸ“¦ where this page comes from