Added SDL_CopyFile() and SDL_CopyStorageFile()

Fixes https://github.com/libsdl-org/SDL/issues/9553
This commit is contained in:
Sam Lantinga
2024-07-21 19:32:16 -07:00
parent 128df75e05
commit 033c9c5951
14 changed files with 213 additions and 0 deletions

View File

@@ -43,6 +43,16 @@ int SDL_RenamePath(const char *oldpath, const char *newpath)
return SDL_SYS_RenamePath(oldpath, newpath);
}
int SDL_CopyFile(const char *oldpath, const char *newpath)
{
if (!oldpath) {
return SDL_InvalidParamError("oldpath");
} else if (!newpath) {
return SDL_InvalidParamError("newpath");
}
return SDL_SYS_CopyFile(oldpath, newpath);
}
int SDL_CreateDirectory(const char *path)
{
/* TODO: Recursively create subdirectories */