mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-05 09:26:25 +00:00
Added SDL_CopyFile() and SDL_CopyStorageFile()
Fixes https://github.com/libsdl-org/SDL/issues/9553
This commit is contained in:
@@ -291,6 +291,24 @@ int SDL_RenameStoragePath(SDL_Storage *storage, const char *oldpath, const char
|
||||
return storage->iface.rename(storage->userdata, oldpath, newpath);
|
||||
}
|
||||
|
||||
int SDL_CopyStorageFile(SDL_Storage *storage, const char *oldpath, const char *newpath)
|
||||
{
|
||||
CHECK_STORAGE_MAGIC()
|
||||
|
||||
if (!oldpath) {
|
||||
return SDL_InvalidParamError("oldpath");
|
||||
}
|
||||
if (!newpath) {
|
||||
return SDL_InvalidParamError("newpath");
|
||||
}
|
||||
|
||||
if (!storage->iface.copy) {
|
||||
return SDL_Unsupported();
|
||||
}
|
||||
|
||||
return storage->iface.copy(storage->userdata, oldpath, newpath);
|
||||
}
|
||||
|
||||
int SDL_GetStoragePathInfo(SDL_Storage *storage, const char *path, SDL_PathInfo *info)
|
||||
{
|
||||
SDL_PathInfo dummy;
|
||||
|
Reference in New Issue
Block a user