mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-01-01 22:30:08 +01:00
GameViewer use VFS. Implemented be_t increment / decrement Implemented se Improved sys_fs syscalls.
54 lines
1.1 KiB
C++
54 lines
1.1 KiB
C++
#pragma once
|
|
|
|
enum DirEntryFlags
|
|
{
|
|
DirEntry_TypeDir = 0x1,
|
|
DirEntry_TypeFile = 0x2,
|
|
DirEntry_TypeMask = 0x3,
|
|
DirEntry_PermWritable = 0x20,
|
|
DirEntry_PermReadable = 0x40,
|
|
DirEntry_PermExecutable = 0x80,
|
|
};
|
|
|
|
struct DirEntryInfo
|
|
{
|
|
wxString name;
|
|
u32 flags;
|
|
time_t create_time;
|
|
time_t access_time;
|
|
time_t modify_time;
|
|
|
|
DirEntryInfo()
|
|
: flags(0)
|
|
, create_time(0)
|
|
, access_time(0)
|
|
, modify_time(0)
|
|
{
|
|
}
|
|
};
|
|
|
|
class vfsDirBase
|
|
{
|
|
protected:
|
|
wxString m_cwd;
|
|
Array<DirEntryInfo> m_entries;
|
|
uint m_pos;
|
|
vfsDevice* m_device;
|
|
|
|
public:
|
|
vfsDirBase(vfsDevice* device);
|
|
virtual ~vfsDirBase();
|
|
|
|
virtual bool Open(const wxString& path);
|
|
virtual bool IsOpened() const;
|
|
virtual bool IsExists(const wxString& path) const;
|
|
virtual const Array<DirEntryInfo>& GetEntries() const;
|
|
virtual void Close();
|
|
virtual wxString GetPath() const;
|
|
|
|
virtual bool Create(const wxString& path)=0;
|
|
//virtual bool Create(const DirEntryInfo& info)=0;
|
|
virtual bool Rename(const wxString& from, const wxString& to)=0;
|
|
virtual bool Remove(const wxString& path)=0;
|
|
virtual const DirEntryInfo* Read();
|
|
}; |