aboutsummaryrefslogtreecommitdiff
path: root/vendor/sdl3/include/SDL_filesystem.h
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/sdl3/include/SDL_filesystem.h')
-rw-r--r--vendor/sdl3/include/SDL_filesystem.h37
1 files changed, 34 insertions, 3 deletions
diff --git a/vendor/sdl3/include/SDL_filesystem.h b/vendor/sdl3/include/SDL_filesystem.h
index af3ca27e0..67f6d7ac8 100644
--- a/vendor/sdl3/include/SDL_filesystem.h
+++ b/vendor/sdl3/include/SDL_filesystem.h
@@ -77,6 +77,9 @@ extern "C" {
* - `parent`: the containing directory of the bundle. For example:
* `/Applications/SDLApp/`
*
+ * **Android Specific Functionality**: This function returns "./", which
+ * allows filesystem operations to use internal storage and the asset system.
+ *
* **Nintendo 3DS Specific Functionality**: This function returns "romfs"
* directory of the application as it is uncommon to store resources outside
* the executable. As such it is not a writable directory.
@@ -89,6 +92,8 @@ extern "C" {
* doesn't implement this functionality, call SDL_GetError() for more
* information.
*
+ * \threadsafety It is safe to call this function from any thread.
+ *
* \since This function is available since SDL 3.2.0.
*
* \sa SDL_GetPrefPath
@@ -134,6 +139,12 @@ extern SDL_DECLSPEC const char * SDLCALL SDL_GetBasePath(void);
* - ...only use letters, numbers, and spaces. Avoid punctuation like "Game
* Name 2: Bad Guy's Revenge!" ... "Game Name 2" is sufficient.
*
+ * Due to historical mistakes, `org` is allowed to be NULL or "". In such
+ * cases, SDL will omit the org subdirectory, including on platforms where it
+ * shouldn't, and including on platforms where this would make your app fail
+ * certification for an app store. New apps should definitely specify a real
+ * string for `org`.
+ *
* The returned path is guaranteed to end with a path separator ('\\' on
* Windows, '/' on most other platforms).
*
@@ -144,6 +155,8 @@ extern SDL_DECLSPEC const char * SDLCALL SDL_GetBasePath(void);
* etc.). This should be freed with SDL_free() when it is no longer
* needed.
*
+ * \threadsafety It is safe to call this function from any thread.
+ *
* \since This function is available since SDL 3.2.0.
*
* \sa SDL_GetBasePath
@@ -216,6 +229,8 @@ typedef enum SDL_Folder
* \returns either a null-terminated C string containing the full path to the
* folder, or NULL if an error happened.
*
+ * \threadsafety It is safe to call this function from any thread.
+ *
* \since This function is available since SDL 3.2.0.
*/
extern SDL_DECLSPEC const char * SDLCALL SDL_GetUserFolder(SDL_Folder folder);
@@ -283,6 +298,8 @@ typedef Uint32 SDL_GlobFlags;
* \returns true on success or false on failure; call SDL_GetError() for more
* information.
*
+ * \threadsafety It is safe to call this function from any thread.
+ *
* \since This function is available since SDL 3.2.0.
*/
extern SDL_DECLSPEC bool SDLCALL SDL_CreateDirectory(const char *path);
@@ -346,6 +363,8 @@ typedef SDL_EnumerationResult (SDLCALL *SDL_EnumerateDirectoryCallback)(void *us
* \returns true on success or false on failure; call SDL_GetError() for more
* information.
*
+ * \threadsafety It is safe to call this function from any thread.
+ *
* \since This function is available since SDL 3.2.0.
*/
extern SDL_DECLSPEC bool SDLCALL SDL_EnumerateDirectory(const char *path, SDL_EnumerateDirectoryCallback callback, void *userdata);
@@ -360,6 +379,8 @@ extern SDL_DECLSPEC bool SDLCALL SDL_EnumerateDirectory(const char *path, SDL_En
* \returns true on success or false on failure; call SDL_GetError() for more
* information.
*
+ * \threadsafety It is safe to call this function from any thread.
+ *
* \since This function is available since SDL 3.2.0.
*/
extern SDL_DECLSPEC bool SDLCALL SDL_RemovePath(const char *path);
@@ -367,7 +388,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_RemovePath(const char *path);
/**
* Rename a file or directory.
*
- * If the file at `newpath` already exists, it will replaced.
+ * If the file at `newpath` already exists, it will be replaced.
*
* Note that this will not copy files across filesystems/drives/volumes, as
* that is a much more complicated (and possibly time-consuming) operation.
@@ -383,6 +404,8 @@ extern SDL_DECLSPEC bool SDLCALL SDL_RemovePath(const char *path);
* \returns true on success or false on failure; call SDL_GetError() for more
* information.
*
+ * \threadsafety It is safe to call this function from any thread.
+ *
* \since This function is available since SDL 3.2.0.
*/
extern SDL_DECLSPEC bool SDLCALL SDL_RenamePath(const char *oldpath, const char *newpath);
@@ -423,6 +446,10 @@ extern SDL_DECLSPEC bool SDLCALL SDL_RenamePath(const char *oldpath, const char
* \returns true on success or false on failure; call SDL_GetError() for more
* information.
*
+ * \threadsafety It is safe to call this function from any thread, but this
+ * operation is not atomic, so the app might need to protect
+ * access to specific paths from other threads if appropriate.
+ *
* \since This function is available since SDL 3.2.0.
*/
extern SDL_DECLSPEC bool SDLCALL SDL_CopyFile(const char *oldpath, const char *newpath);
@@ -436,6 +463,8 @@ extern SDL_DECLSPEC bool SDLCALL SDL_CopyFile(const char *oldpath, const char *n
* \returns true on success or false if the file doesn't exist, or another
* failure; call SDL_GetError() for more information.
*
+ * \threadsafety It is safe to call this function from any thread.
+ *
* \since This function is available since SDL 3.2.0.
*/
extern SDL_DECLSPEC bool SDLCALL SDL_GetPathInfo(const char *path, SDL_PathInfo *info);
@@ -444,10 +473,10 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GetPathInfo(const char *path, SDL_PathInfo
* Enumerate a directory tree, filtered by pattern, and return a list.
*
* Files are filtered out if they don't match the string in `pattern`, which
- * may contain wildcard characters '\*' (match everything) and '?' (match one
+ * may contain wildcard characters `*` (match everything) and `?` (match one
* character). If pattern is NULL, no filtering is done and all results are
* returned. Subdirectories are permitted, and are specified with a path
- * separator of '/'. Wildcard characters '\*' and '?' never match a path
+ * separator of `/`. Wildcard characters `*` and `?` never match a path
* separator.
*
* `flags` may be set to SDL_GLOB_CASEINSENSITIVE to make the pattern matching
@@ -490,6 +519,8 @@ extern SDL_DECLSPEC char ** SDLCALL SDL_GlobDirectory(const char *path, const ch
* platform-dependent notation. NULL if there's a problem. This
* should be freed with SDL_free() when it is no longer needed.
*
+ * \threadsafety It is safe to call this function from any thread.
+ *
* \since This function is available since SDL 3.2.0.
*/
extern SDL_DECLSPEC char * SDLCALL SDL_GetCurrentDirectory(void);