sdlxGetStorageFileSize function storage
Query the size of a file within a storage container.
\param storage a storage container to query. \param path the relative path of the file to query. \param length a pointer to be filled with the file's length. \returns true if the file could be queried or false on failure; call SDL_GetError() for more information.
\since This function is available since SDL 3.2.0.
\sa SDL_ReadStorageFile \sa SDL_StorageReady
extern SDL_DECLSPEC bool SDLCALL SDL_GetStorageFileSize(SDL_Storage *storage, const char *path, Uint64 *length)
See also:
Implementation
int? sdlxGetStorageFileSize(Pointer<SdlStorage> storage, String path) =>
ffi.using((arena) {
final lengthPointer = arena<Uint64>();
if (!sdlGetStorageFileSize(storage, path, lengthPointer)) {
return null;
}
return lengthPointer.value;
});