SDL_GetAndro...alStoragePath(3)
π SDL_GetAndroidExternalStoragePath π
okay bestie, welcome to the SDL3 FUNCTIONS corner of the manual β this one's called SDL_GetAndroidExternalStoragePath(3) and it's literally the glow-up guide to finding your app's external storage folder. let's get into it β¨
πΈ NAME πΈ
SDL_GetAndroidExternalStoragePath β get the path used for external storage for this Android application. no cap, that's the whole vibe π«Ά
π SYNOPSIS π
#include <SDL3/SDL_system.h>
const char * SDL_GetAndroidExternalStoragePath(void);
she takes no arguments, she returns a const char *, she's lowkey effortless π
π¦ DESCRIPTION π¦
so here's the tea: this path is unique to your application, but β and this is the part you gotta hear β it's public and it can be written to by other applications. it's giving "shared apartment, everyone has a key" π not private, not locked down, just out there.
your external storage path is typically:
/storage/sdcard0/Android/data/your.app.package/files
and bestie, this is a C wrapper over android.content.Context.getExternalFilesDir(), so if you wanna read the actual Android docs (iykyk), they live here:
https://developer.android.com/reference/android/content/Context#getExternalFilesDir()
β RETURN VALUE β
- on success: returns the path used for external storage for this application π₯³
- on failure: returns
NULLπ and you should callSDL_GetError()for more information, because she will tell you what went wrong fr fr
π AVAILABILITY π
this function is available since SDL 3.2.0. old-heads stay mad, we're on the new stuff β¨
π SEE ALSO π
SDL_GetAndroidExternalStorageState(3)SDL_GetAndroidInternalStoragePath(3)SDL_GetAndroidCachePath(3)
go read those too, they're the friend group π«Ά
Simple Directmedia Layer wrote this one, it's SDL 3.4.18, and that's the whole page β mwah π thanks for reading, you ate that, periodt. πβ¨
π¦ 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