readFile method

Uint8List? readFile(
  1. String path
)

Synchronously read a file from a storage container into a client-provided buffer.

The value of length must match the length of the file exactly; call SDL_GetStorageFileSize() to get this value. This behavior may be relaxed in a future release.

\param storage a storage container to read from. \param path the relative path of the file to read. \param destination a client-provided buffer to read the file into. \param length the length of the destination buffer. \returns true if the file was read or false on failure; call SDL_GetError() for more information.

\since This function is available since SDL 3.2.0.

\sa SDL_GetStorageFileSize \sa SDL_StorageReady \sa SDL_WriteStorageFile

extern SDL_DECLSPEC bool SDLCALL SDL_ReadStorageFile(SDL_Storage *storage, const char *path, void *destination, Uint64 length)

Implementation

Uint8List? readFile(String path) => sdlxReadStorageFile(this, path);