SDL_OpenFileStorage(3)
πΎ SDL_OpenFileStorage πΎ
okay bestie, welcome to the SDL3 FUNCTIONS section of the manual, we're doing storage today π
β¨ NAME β¨
SDL_OpenFileStorage β opens up a container for local filesystem storage. that's it, that's the job π
πΈ SYNOPSIS πΈ
#include <SDL3/SDL_storage.h>
SDL_Storage * SDL_OpenFileStorage(const char *path);
π¦ DESCRIPTION π¦
so like. this one is provided for development and tools. that's its whole lane, no cap. it is NOT the one you want for your actual shipping game, bestie, i'm gonna hold your hand when i say this:
if you're making a portable application, you should be using SDL_OpenTitleStorage() for access to game data and SDL_OpenUserStorage() for access to user data. those are your mains. SDL_OpenFileStorage() is the dev/tools girlie, and we love her for that π
π FUNCTION PARAMETERS π
pathβ the base path prepended to all storage paths, orNULLfor no base path. so basically whatever you drop in here becomes the prefix on top of everything else you ask for β¨
π RETURN VALUE π
Returns a filesystem storage container on success or NULL on failure π and if you get the NULL? call SDL_GetError() for more information, she will tell you what went wrong fr fr.
π AVAILABILITY π
this function is available since SDL 3.2.0 β
π SEE ALSO π
SDL_CloseStorage(3)SDL_GetStorageFileSize(3)SDL_GetStorageSpaceRemaining(3)SDL_OpenTitleStorage(3)SDL_OpenUserStorage(3)SDL_ReadStorageFile(3)SDL_WriteStorageFile(3)
lowkey the whole storage family ate, go read all of them, iykyk π«Ά
and that's the page!! brought to you by Simple Directmedia Layer, running the SDL 3.4.18 era, and if you need me i'll be right here in SDL_OpenFileStorage(3) being iconic π
β¨π
π¦ where this page comes from
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms