mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-06 06:55:09 +00:00
Improved VFS
- Implemended vfsDir. - Improved vfsDevice. - Improved vfsFile.
This commit is contained in:
parent
5d59dae730
commit
321d323beb
36 changed files with 479 additions and 390 deletions
|
|
@ -27,28 +27,27 @@ static const wxSeekMode vfs2wx_seek(vfsSeekMode mode)
|
|||
return wxFromStart;
|
||||
}
|
||||
|
||||
vfsLocalFile::vfsLocalFile() : vfsFileBase()
|
||||
vfsLocalFile::vfsLocalFile(vfsDevice* device) : vfsFileBase(device)
|
||||
{
|
||||
}
|
||||
|
||||
vfsLocalFile::vfsLocalFile(const wxString path, vfsOpenMode mode) : vfsFileBase()
|
||||
{
|
||||
Open(path, mode);
|
||||
}
|
||||
|
||||
vfsDevice* vfsLocalFile::GetNew()
|
||||
{
|
||||
return new vfsLocalFile();
|
||||
}
|
||||
|
||||
bool vfsLocalFile::Open(const wxString& path, vfsOpenMode mode)
|
||||
{
|
||||
Close();
|
||||
|
||||
if(!m_file.Access(vfsDevice::GetWinPath(GetLocalPath(), path), vfs2wx_mode(mode))) return false;
|
||||
if(m_device)
|
||||
{
|
||||
if(!m_file.Access(vfsDevice::GetWinPath(m_device->GetLocalPath(), path), vfs2wx_mode(mode))) return false;
|
||||
|
||||
return m_file.Open(vfsDevice::GetWinPath(GetLocalPath(), path), vfs2wx_mode(mode)) &&
|
||||
vfsFileBase::Open(vfsDevice::GetPs3Path(GetPs3Path(), path), mode);
|
||||
return m_file.Open(vfsDevice::GetWinPath(m_device->GetLocalPath(), path), vfs2wx_mode(mode)) &&
|
||||
vfsFileBase::Open(vfsDevice::GetPs3Path(m_device->GetPs3Path(), path), mode);
|
||||
}
|
||||
else
|
||||
{
|
||||
if(!m_file.Access(path, vfs2wx_mode(mode))) return false;
|
||||
|
||||
return m_file.Open(path, vfs2wx_mode(mode)) && vfsFileBase::Open(path, mode);
|
||||
}
|
||||
}
|
||||
|
||||
bool vfsLocalFile::Create(const wxString& path)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue