Skip to main content

SDL_OpenUserStorage

Function SDL_OpenUserStorage 

Source
pub unsafe extern "C" fn SDL_OpenUserStorage(
    org: *const c_char,
    app: *const c_char,
    props: SDL_PropertiesID,
) -> *mut SDL_Storage
Expand description

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

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.

Parameter: org the name of your organization. Parameter: app the name of your application. Parameter: props a property list that may contain backend-specific information. Returns: a user storage container on success or NULL on failure; call SDL_GetError() for more information.

Available Since: This function is available since SDL 3.2.0.

See Also: SDL_CloseStorage See Also: SDL_GetStorageFileSize See Also: SDL_GetStorageSpaceRemaining See Also: SDL_OpenTitleStorage See Also: SDL_ReadStorageFile See Also: SDL_StorageReady See Also: SDL_WriteStorageFile