You can pass NULL to SDL_GetPathInfo() and SDL_GetStoragePathInfo() to test for the existence of a file.

This commit is contained in:
Sam Lantinga
2024-03-18 08:43:22 -07:00
parent ebb6582534
commit 92d01ef12a
4 changed files with 22 additions and 8 deletions

View File

@@ -317,8 +317,8 @@ extern DECLSPEC int SDLCALL SDL_RenameStoragePath(SDL_Storage *storage, const ch
*
* \param storage a storage container
* \param path the path to query
* \param info a pointer filled in with information about the path
* \returns 0 on success or a negative error code on failure; call
* \param info a pointer filled in with information about the path, or NULL to check for the existence of a file
* \returns 0 on success or a negative error code if the file doesn't exist, or another failure; call
* SDL_GetError() for more information.
*
* \since This function is available since SDL 3.0.0.