writeFile method

bool writeFile(
  1. String path,
  2. Uint8List source
)

Synchronously write a file from client memory into a storage container.

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

\since This function is available since SDL 3.2.0.

\sa SDL_GetStorageSpaceRemaining \sa SDL_ReadStorageFile \sa SDL_StorageReady

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

Implementation

bool writeFile(String path, Uint8List source) =>
    sdlxWriteStorageFile(this, path, source);