SDL_Folder - The type of the OS-provided default folder for a specific purpose.
Contents
Availability
This enum is available since SDL 3.2.0.
Description
Note that the Trash folder isn't included here, because trashing files usually involves extra OS-specific
functionality to remember the file's original location.
The folders supported per platform are:
| | Windows | macOS/iOS | tvOS | Unix (XDG) | Haiku | Emscripten | | ----------- | ------- |
--------- | ---- | ---------- | ----- | ---------- | | HOME | X | X | | X
| X | X | | DESKTOP | X | X | | X | X | | |
DOCUMENTS | X | X | | X | | | | DOWNLOADS | Vista+ | X
| | X | | | | MUSIC | X | X | | X |
| | | PICTURES | X | X | | X | | | |
PUBLICSHARE | | X | | X | | | | SAVEDGAMES | Vista+ |
| | | | | | SCREENSHOTS | Vista+ | | | |
| | | TEMPLATES | X | X | | X | | | | VIDEOS
| X | X* | | X | | |
Note that on macOS/iOS, the Videos folder is called "Movies".
Name
SDL_Folder - The type of the OS-provided default folder for a specific purpose.
See Also
SDL_GetUserFolder(3) Simple Directmedia Layer SDL 3.2.20 SDL_Folder(3type)
Synopsis
#include<SDL3/SDL_filesystem.h>typedefenumSDL_Folder{SDL_FOLDER_HOME,/**<Thefolderwhichcontainsallofthecurrentuser'sdata,preferences,anddocuments.Itusuallycontainsmostoftheotherfolders.Ifarequestedfolderdoesnotexist,thehomefoldercanbeconsideredasafefallbacktostoreauser'sdocuments.*/SDL_FOLDER_DESKTOP,/**<Thefolderoffilesthataredisplayedonthedesktop.Notethattheexistenceofadesktopfolderdoesnotguaranteethatthesystemdoesshowiconsonitsdesktop;certainGNU/Linuxdistroswithagraphicalenvironmentmaynothavedesktopicons.*/SDL_FOLDER_DOCUMENTS,/**<Userdocumentfiles,possiblyapplication-specific.Thisisagoodplacetosaveauser'sprojects.*/SDL_FOLDER_DOWNLOADS,/**<Standardfolderforuserfilesdownloadedfromtheinternet.*/SDL_FOLDER_MUSIC,/**<Musicfilesthatcanbeplayedusingastandardmusicplayer(mp3,ogg...).*/SDL_FOLDER_PICTURES,/**<Imagefilesthatcanbedisplayedusingastandardviewer(png,jpg...).*/SDL_FOLDER_PUBLICSHARE,/**<Filesthataremeanttobesharedwithotherusersonthesamecomputer.*/SDL_FOLDER_SAVEDGAMES,/**<Savefilesforgames.*/SDL_FOLDER_SCREENSHOTS,/**<Applicationscreenshots.*/SDL_FOLDER_TEMPLATES,/**<Templatefilestobeusedwhentheuserrequeststhedesktopenvironmenttocreateanewfileinacertainfolder,suchas"NewTextFile.txt".AnyfileintheTemplatesfoldercanbeusedasastartingpointforanewfile.*/SDL_FOLDER_VIDEOS,/**<Videofilesthatcanbeplayedusingastandardvideoplayer(mp4,webm...).*/SDL_FOLDER_COUNT/**<Totalnumberoftypesinthisenum,notafoldertypebyitself.*/}SDL_Folder;