sdlRemoveStoragePath function
Remove a file or an empty directory in a writable storage container.
\param storage a storage container. \param path the path of the directory to enumerate. \returns true on success or false on failure; call SDL_GetError() for more information.
\since This function is available since SDL 3.1.3.
\sa SDL_StorageReady
extern SDL_DECLSPEC bool SDLCALL SDL_RemoveStoragePath(SDL_Storage *storage, const char *path)
Implementation
bool sdlRemoveStoragePath(Pointer<SdlStorage> storage, String? path) {
final sdlRemoveStoragePathLookupFunction = libSdl3.lookupFunction<
Uint8 Function(Pointer<SdlStorage> storage, Pointer<Utf8> path),
int Function(Pointer<SdlStorage> storage,
Pointer<Utf8> path)>('SDL_RemoveStoragePath');
final pathPointer = path != null ? path.toNativeUtf8() : nullptr;
final result = sdlRemoveStoragePathLookupFunction(storage, pathPointer) == 1;
calloc.free(pathPointer);
return result;
}