sdlAndroidGetExternalStoragePath function
Get the path used for external storage for this application.
This path is unique to your application, but is public and can be written to by other applications.
Your external storage path is typically:
/storage/sdcard0/Android/data/your.app.package/files
.
\returns the path used for external storage for this application on success or NULL on failure; call SDL_GetError() for more information.
\since This function is available since SDL 2.0.0.
\sa SDL_AndroidGetExternalStorageState
extern DECLSPEC const char * SDLCALL SDL_AndroidGetExternalStoragePath(void)
Implementation
String? sdlAndroidGetExternalStoragePath() {
final sdlAndroidGetExternalStoragePathLookupFunction = libSdl2.lookupFunction<
Pointer<Utf8> Function(),
Pointer<Utf8> Function()>('SDL_AndroidGetExternalStoragePath');
final result = sdlAndroidGetExternalStoragePathLookupFunction();
if (result == nullptr) {
return null;
}
return result.toDartString();
}