mirror of
https://github.com/RPCSX/rpcsx.git
synced 2025-12-06 07:12:14 +01:00
* cellFsOpendir, cellFsReaddir, cellFsClosedir functions implemented. * vfsDirBase: m_entryes, GetEntryes renamed to m_entries, GetEntries respectively. * vfsLocalDir: Read() function added to get the entries one by one. * Moved IsExists() from vfsLocalDir to vfsDirBase to avoid "R6025 pure virtual function call" error. * Other minor changes in some functions of sys_fs
49 lines
653 B
C++
49 lines
653 B
C++
#include "stdafx.h"
|
|
#include "vfsDirBase.h"
|
|
|
|
vfsDirBase::vfsDirBase(const wxString& path)
|
|
{
|
|
Open(path);
|
|
}
|
|
|
|
vfsDirBase::~vfsDirBase()
|
|
{
|
|
}
|
|
|
|
bool vfsDirBase::Open(const wxString& path)
|
|
{
|
|
if(!IsOpened())
|
|
Close();
|
|
|
|
if(!IsExists(path))
|
|
return false;
|
|
|
|
m_cwd += '/' + path;
|
|
return true;
|
|
}
|
|
|
|
bool vfsDirBase::IsOpened() const
|
|
{
|
|
return !m_cwd.IsEmpty();
|
|
}
|
|
|
|
bool vfsDirBase::IsExists(const wxString& path) const
|
|
{
|
|
return wxDirExists(path);
|
|
}
|
|
|
|
const Array<DirEntryInfo>& vfsDirBase::GetEntries() const
|
|
{
|
|
return m_entries;
|
|
}
|
|
|
|
void vfsDirBase::Close()
|
|
{
|
|
m_cwd = wxEmptyString;
|
|
m_entries.Clear();
|
|
}
|
|
|
|
wxString vfsDirBase::GetPath() const
|
|
{
|
|
return m_cwd;
|
|
} |