mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-30 15:08:31 +00:00
filesystem: Rename some internal symbols to remove "FSops" terminology.
This removes the "FSops" naming scheme, which was meant to mirror the "RWops" naming scheme, which was also recently removed from SDL3. The build system defines (`SDL_FSOPS_POSIX`, etc) and the source code filenames retain this, because there's already things using the word "filesystem" that might overlap (for example, lots of things have a unique "SDL_sysfilesystem.c", to query base dirs, etc, but almost everything uses the POSIX "SDL_sysfsops.c" source code. Fixes #9288.
This commit is contained in:
@@ -48,7 +48,7 @@ int SDL_RemovePath(const char *path)
|
||||
if (!path) {
|
||||
return SDL_InvalidParamError("path");
|
||||
}
|
||||
return SDL_SYS_FSremove(path);
|
||||
return SDL_SYS_RemovePath(path);
|
||||
}
|
||||
|
||||
int SDL_RenamePath(const char *oldpath, const char *newpath)
|
||||
@@ -58,7 +58,7 @@ int SDL_RenamePath(const char *oldpath, const char *newpath)
|
||||
} else if (!newpath) {
|
||||
return SDL_InvalidParamError("newpath");
|
||||
}
|
||||
return SDL_SYS_FSrename(oldpath, newpath);
|
||||
return SDL_SYS_RenamePath(oldpath, newpath);
|
||||
}
|
||||
|
||||
int SDL_CreateDirectory(const char *path)
|
||||
@@ -67,7 +67,7 @@ int SDL_CreateDirectory(const char *path)
|
||||
if (!path) {
|
||||
return SDL_InvalidParamError("path");
|
||||
}
|
||||
return SDL_SYS_FSmkdir(path);
|
||||
return SDL_SYS_CreateDirectory(path);
|
||||
}
|
||||
|
||||
int SDL_EnumerateDirectory(const char *path, SDL_EnumerateDirectoryCallback callback, void *userdata)
|
||||
@@ -77,15 +77,15 @@ int SDL_EnumerateDirectory(const char *path, SDL_EnumerateDirectoryCallback call
|
||||
} else if (!callback) {
|
||||
return SDL_InvalidParamError("callback");
|
||||
}
|
||||
return SDL_SYS_FSenumerate(path, path, callback, userdata);
|
||||
return SDL_SYS_EnumerateDirectory(path, path, callback, userdata);
|
||||
}
|
||||
|
||||
int SDL_GetPathInfo(const char *path, SDL_PathInfo *stat)
|
||||
int SDL_GetPathInfo(const char *path, SDL_PathInfo *info)
|
||||
{
|
||||
if (!path) {
|
||||
return SDL_InvalidParamError("path");
|
||||
} else if (!stat) {
|
||||
return SDL_InvalidParamError("stat");
|
||||
} else if (!info) {
|
||||
return SDL_InvalidParamError("info");
|
||||
}
|
||||
return SDL_SYS_FSstat(path, stat);
|
||||
return SDL_SYS_GetPathInfo(path, info);
|
||||
}
|
||||
|
Reference in New Issue
Block a user