table of contents
- trixie 3.2.10+ds-1
- testing 3.2.28+ds-1
- unstable 3.2.28+ds-1
- experimental 3.3.4+ds-1
| SDL_GetUserFolder(3) | SDL3 FUNCTIONS | SDL_GetUserFolder(3) |
NAME¶
SDL_GetUserFolder - Finds the most suitable user folder for a specific purpose.
SYNOPSIS¶
#include <SDL3/SDL_filesystem.h>
const char * SDL_GetUserFolder(SDL_Folder folder);
DESCRIPTION¶
Many OSes provide certain standard folders for certain purposes, such as storing pictures, music or videos for a certain user. This function gives the path for many of those special locations.
This function is specifically for _user_ folders, which are meant for the user to access and manage. For application-specific folders, meant to hold data for the application to manage, see SDL_GetBasePath() and SDL_GetPrefPath().
The returned path is guaranteed to end with a path separator ('\\' on Windows, '/' on most other platforms).
If NULL is returned, the error may be obtained with SDL_GetError().
FUNCTION PARAMETERS¶
- folder
- the type of folder to find.
RETURN VALUE¶
Returns either a null-terminated C string containing the full path to the folder, or NULL if an error happened.
THREAD SAFETY¶
It is safe to call this function from any thread.
AVAILABILITY¶
This function is available since SDL 3.2.0.
| SDL 3.3.4 | Simple Directmedia Layer |