mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-03 21:41:26 +12:00
49 lines
821 B
C++
49 lines
821 B
C++
#include "stdafx.h"
|
|
#include "vfsLocalFile.h"
|
|
|
|
vfsLocalFile::vfsLocalFile(vfsDevice* device) : vfsFileBase(device)
|
|
{
|
|
}
|
|
|
|
bool vfsLocalFile::Open(const std::string& path, u32 mode)
|
|
{
|
|
Close();
|
|
|
|
return m_file.open(path, mode) && vfsFileBase::Open(path, mode);
|
|
}
|
|
|
|
void vfsLocalFile::Close()
|
|
{
|
|
m_file.close();
|
|
vfsFileBase::Close();
|
|
}
|
|
|
|
u64 vfsLocalFile::GetSize() const
|
|
{
|
|
return m_file.size();
|
|
}
|
|
|
|
u64 vfsLocalFile::Write(const void* src, u64 size)
|
|
{
|
|
return m_file.write(src, size);
|
|
}
|
|
|
|
u64 vfsLocalFile::Read(void* dst, u64 size)
|
|
{
|
|
return m_file.read(dst, size);
|
|
}
|
|
|
|
u64 vfsLocalFile::Seek(s64 offset, fs::seek_mode whence)
|
|
{
|
|
return m_file.seek(offset, whence);
|
|
}
|
|
|
|
u64 vfsLocalFile::Tell() const
|
|
{
|
|
return m_file.seek(0, fs::seek_cur);
|
|
}
|
|
|
|
bool vfsLocalFile::IsOpened() const
|
|
{
|
|
return m_file && vfsFileBase::IsOpened();
|
|
}
|