-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1917b34
commit 645294c
Showing
1 changed file
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | ||