mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-12 01:38:37 +12:00
VFS::TruncateFile() implemented
This commit is contained in:
parent
b1f7543436
commit
f2276bb70c
7 changed files with 117 additions and 54 deletions
|
@ -315,6 +315,18 @@ bool VFS::CopyFile(const std::string& ps3_path_from, const std::string& ps3_path
|
|||
return false;
|
||||
}
|
||||
|
||||
bool VFS::TruncateFile(const std::string& ps3_path, u64 length) const
|
||||
{
|
||||
std::string path;
|
||||
|
||||
if (vfsDevice* dev = GetDevice(ps3_path, path))
|
||||
{
|
||||
return rTruncate(path, length);
|
||||
}
|
||||
|
||||
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