Skip to content

Commit

Permalink
Sync SDL3 header -> wiki
Browse files Browse the repository at this point in the history
  • Loading branch information
SDLWikiBot committed Apr 21, 2024
1 parent 1917b34 commit 645294c
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions SDL3/SDL_WriteStorageFile.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
###### (This is the documentation for SDL3, which is under heavy development and the API is changing! [SDL2](https://wiki.libsdl.org/SDL2/) is the current stable version!)
# SDL_WriteStorageFile

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

## Header File

Defined in [SDL_storage.h](https://github.com/libsdl-org/SDL/blob/main/include/SDL3/SDL_storage.h), but apps should use `#include <SDL3/SDL.h>`

## Syntax

```c
int SDL_WriteStorageFile(SDL_Storage *storage, const char *path, const void *source, Uint64 length);

```
## Function Parameters
| | |
| --------------- | -------------------------------------- |
| **storage** | a storage container to write to |
| **path** | the relative path of the file to write |
| **source** | a client-provided buffer to write from |
| **length** | the length of the source buffer |
## Return Value
Returns 0 if the file was written, a negative value otherwise; call
[SDL_GetError](SDL_GetError)() for more information.
## Version
This function is available since SDL 3.0.0.
## See Also
* [SDL_GetStorageSpaceRemaining](SDL_GetStorageSpaceRemaining)
* [SDL_ReadStorageFile](SDL_ReadStorageFile)
* [SDL_StorageReady](SDL_StorageReady)
----
[CategoryAPI](CategoryAPI), [CategoryAPIFunction](CategoryAPIFunction)

0 comments on commit 645294c

Please sign in to comment.