SDL Wiki
(This is the documentation for SDL3, which is the current stable version. SDL2 was the previous version!)

SDL_OpenUserStorage

Opens up a container for a user's unique read/write filesystem.

Header File

Defined in <SDL3/SDL_storage.h>

Syntax

SDL_Storage * SDL_OpenUserStorage(const char *org, const char *app, SDL_PropertiesID props);

Function Parameters

const char * org the name of your organization.
const char * app the name of your application.
SDL_PropertiesID props a property list that may contain backend-specific information.

Return Value

(SDL_Storage *) Returns a user storage container on success or NULL on failure; call SDL_GetError() for more information.

Remarks

While title storage can generally be kept open throughout runtime, user storage should only be opened when the client is ready to read/write files. This allows the backend to properly batch file operations and flush them when the container has been closed; ensuring safe and optimal save I/O.

Version

This function is available since SDL 3.1.3.

See Also


CategoryAPI, CategoryAPIFunction, CategoryStorage


[ edit | delete | history | feedback | raw ]

[ front page | index | search | recent changes | git repo | offline html ]

All wiki content is licensed under Creative Commons Attribution 4.0 International (CC BY 4.0).
Wiki powered by ghwikipp.