mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-10 08:51:28 +12:00
34 lines
841 B
C++
34 lines
841 B
C++
#pragma once
|
|
#include "vfsStream.h"
|
|
|
|
enum vfsOpenMode : u32
|
|
{
|
|
vfsRead = o_read,
|
|
vfsReadWrite = o_read | o_write,
|
|
vfsWriteNew = o_write | o_create | o_trunc,
|
|
vfsWriteExcl = o_write | o_create | o_excl,
|
|
};
|
|
|
|
class vfsDevice;
|
|
|
|
struct vfsFileBase : public vfsStream
|
|
{
|
|
protected:
|
|
std::string m_path;
|
|
u32 m_mode;
|
|
vfsDevice* m_device;
|
|
|
|
public:
|
|
vfsFileBase(vfsDevice* device);
|
|
virtual ~vfsFileBase() override;
|
|
|
|
virtual bool Open(const std::string& path, u32 mode);
|
|
virtual bool Close() override;
|
|
virtual bool Exists(const std::string& path) { return false; }
|
|
virtual bool Rename(const std::string& from, const std::string& to) { return false; }
|
|
virtual bool Remove(const std::string& path) { return false; }
|
|
virtual bool IsOpened() const override { return !m_path.empty(); }
|
|
|
|
std::string GetPath() const;
|
|
u32 GetOpenMode() const;
|
|
};
|