mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-10 08:51:28 +12: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
|
@ -1,9 +1,10 @@
|
|||
#include "stdafx.h"
|
||||
#include "vfsDirBase.h"
|
||||
|
||||
vfsDirBase::vfsDirBase(const wxString& path)
|
||||
vfsDirBase::vfsDirBase(vfsDevice* device)
|
||||
: m_pos(0)
|
||||
, m_device(device)
|
||||
{
|
||||
Open(path);
|
||||
}
|
||||
|
||||
vfsDirBase::~vfsDirBase()
|
||||
|
@ -18,6 +19,7 @@ bool vfsDirBase::Open(const wxString& path)
|
|||
if(!IsExists(path))
|
||||
return false;
|
||||
|
||||
m_pos = 0;
|
||||
m_cwd += '/' + path;
|
||||
return true;
|
||||
}
|
||||
|
@ -46,4 +48,12 @@ void vfsDirBase::Close()
|
|||
wxString vfsDirBase::GetPath() const
|
||||
{
|
||||
return m_cwd;
|
||||
}
|
||||
|
||||
const DirEntryInfo* vfsDirBase::Read()
|
||||
{
|
||||
if (m_pos >= m_entries.GetCount())
|
||||
return nullptr;
|
||||
|
||||
return &m_entries[m_pos++];
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue