rpcsx/rpcs3/Emu/FS/vfsDirBase.cpp

44 lines
567 B
C++
Raw Normal View History

#include "stdafx.h"
2013-11-19 11:30:58 +01:00
#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();
}
const Array<DirEntryInfo>& vfsDirBase::GetEntryes() const
{
return m_entryes;
}
void vfsDirBase::Close()
{
m_cwd = wxEmptyString;
m_entryes.Clear();
}
wxString vfsDirBase::GetPath() const
{
return m_cwd;
}