sdlAndroidGetInternalStoragePath function

String? sdlAndroidGetInternalStoragePath()

Get the path used for internal storage for this application.

This path is unique to your application and cannot be written to by other applications.

Your internal storage path is typically: /data/data/your.app.package/files.

\returns the path used for internal storage 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_AndroidGetInternalStoragePath(void)

Implementation

String? sdlAndroidGetInternalStoragePath() {
  final sdlAndroidGetInternalStoragePathLookupFunction = libSdl2.lookupFunction<
      Pointer<Utf8> Function(),
      Pointer<Utf8> Function()>('SDL_AndroidGetInternalStoragePath');
  final result = sdlAndroidGetInternalStoragePathLookupFunction();
  if (result == nullptr) {
    return null;
  }
  return result.toDartString();
}