mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-01-24 17:40:33 +01:00
* cellFsOpendir, cellFsReaddir, cellFsClosedir functions implemented. * vfsDirBase: m_entryes, GetEntryes renamed to m_entries, GetEntries respectively. * vfsLocalDir: Read() function added to get the entries one by one. * Moved IsExists() from vfsLocalDir to vfsDirBase to avoid "R6025 pure virtual function call" error. * Other minor changes in some functions of sys_fs
51 lines
1,022 B
C++
51 lines
1,022 B
C++
#pragma once
|
|
|
|
enum DirEntryFlags
|
|
{
|
|
DirEntry_TypeDir = 0x0,
|
|
DirEntry_TypeFile = 0x1,
|
|
DirEntry_TypeMask = 0x1,
|
|
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;
|
|
|
|
public:
|
|
vfsDirBase(const wxString& path);
|
|
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;
|
|
}; |