rpcs3/rpcs3/Emu/FS/vfsDir.cpp
DH 05184d2e71 Improved GameViewer
GameViewer use VFS.
Implemented be_t increment / decrement
Implemented se
Improved sys_fs syscalls.
2014-02-22 04:53:06 +02:00

69 lines
1 KiB
C++

#include "stdafx.h"
#include "vfsDir.h"
vfsDir::vfsDir()
: vfsDirBase(nullptr)
, m_stream(nullptr)
{
}
vfsDir::vfsDir(const wxString path)
: vfsDirBase(nullptr)
, m_stream(nullptr)
{
Open(path);
}
bool vfsDir::Open(const wxString& path)
{
Close();
m_stream.reset(Emu.GetVFS().OpenDir(path));
return m_stream && m_stream->IsOpened();
}
bool vfsDir::Create(const wxString& path)
{
return m_stream->Create(path);
}
bool vfsDir::IsExists(const wxString& path) const
{
return m_stream->IsExists(path);
}
const Array<DirEntryInfo>& vfsDir::GetEntries() const
{
return m_stream->GetEntries();
}
bool vfsDir::Rename(const wxString& from, const wxString& to)
{
return m_stream->Rename(from, to);
}
bool vfsDir::Remove(const wxString& path)
{
return m_stream->Remove(path);
}
const DirEntryInfo* vfsDir::Read()
{
return m_stream->Read();
}
void vfsDir::Close()
{
m_stream.reset();
}
wxString vfsDir::GetPath() const
{
return m_stream->GetPath();
}
bool vfsDir::IsOpened() const
{
return m_stream && m_stream->IsOpened();
}