mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-09 00:11:24 +12:00
VFS::CopyFile implemented
This commit is contained in:
parent
94b3cdf9e7
commit
16fe7919a0
5 changed files with 90 additions and 12 deletions
|
@ -7,6 +7,7 @@
|
|||
#include "Emu/System.h"
|
||||
|
||||
#undef CreateFile
|
||||
#undef CopyFile
|
||||
|
||||
std::vector<std::string> simplify_path_blocks(const std::string& path)
|
||||
{
|
||||
|
@ -297,6 +298,21 @@ bool VFS::RenameDir(const std::string& ps3_path_from, const std::string& ps3_pat
|
|||
return false;
|
||||
}
|
||||
|
||||
bool VFS::CopyFile(const std::string& ps3_path_from, const std::string& ps3_path_to, bool overwrite) const
|
||||
{
|
||||
std::string path_from, path_to;
|
||||
|
||||
if (vfsDevice* dev = GetDevice(ps3_path_from, path_from))
|
||||
{
|
||||
if (vfsDevice* dev_ = GetDevice(ps3_path_to, path_to))
|
||||
{
|
||||
return rCopy(path_from, path_to, overwrite);
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
vfsDevice* VFS::GetDevice(const std::string& ps3_path, std::string& path) const
|
||||
{
|
||||
auto try_get_device = [this, &path](const std::string& ps3_path) -> vfsDevice*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue