mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-16 17:43:11 +00:00
vfsLocalDir::IsOpened() implemented
This commit is contained in:
parent
36f76bf288
commit
270c851645
@ -318,6 +318,11 @@ bool rDir::Open(const std::string& path)
|
|||||||
return reinterpret_cast<wxDir*>(handle)->Open(fmt::FromUTF8(path));
|
return reinterpret_cast<wxDir*>(handle)->Open(fmt::FromUTF8(path));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool rDir::IsOpened() const
|
||||||
|
{
|
||||||
|
return reinterpret_cast<wxDir*>(handle)->IsOpened();
|
||||||
|
}
|
||||||
|
|
||||||
bool rDir::GetFirst(std::string *filename) const
|
bool rDir::GetFirst(std::string *filename) const
|
||||||
{
|
{
|
||||||
wxString str;
|
wxString str;
|
||||||
|
@ -66,6 +66,7 @@ struct rDir
|
|||||||
rDir(const rDir& other) = delete;
|
rDir(const rDir& other) = delete;
|
||||||
rDir(const std::string &path);
|
rDir(const std::string &path);
|
||||||
bool Open(const std::string& path);
|
bool Open(const std::string& path);
|
||||||
|
bool IsOpened() const;
|
||||||
static bool Exists(const std::string &path);
|
static bool Exists(const std::string &path);
|
||||||
bool GetFirst(std::string *filename) const;
|
bool GetFirst(std::string *filename) const;
|
||||||
bool GetNext(std::string *filename) const;
|
bool GetNext(std::string *filename) const;
|
||||||
|
@ -15,8 +15,6 @@ bool vfsLocalDir::Open(const std::string& path)
|
|||||||
if(!vfsDirBase::Open(path))
|
if(!vfsDirBase::Open(path))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
rDir dir;
|
|
||||||
|
|
||||||
if(!dir.Open(path))
|
if(!dir.Open(path))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
@ -57,3 +55,8 @@ bool vfsLocalDir::Remove(const std::string& path)
|
|||||||
{
|
{
|
||||||
return rRmdir(path);
|
return rRmdir(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool vfsLocalDir::IsOpened() const
|
||||||
|
{
|
||||||
|
return dir.IsOpened() && vfsDirBase::IsOpened();
|
||||||
|
}
|
||||||
|
@ -5,6 +5,7 @@ class vfsLocalDir : public vfsDirBase
|
|||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
u32 m_pos;
|
u32 m_pos;
|
||||||
|
rDir dir;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
vfsLocalDir(vfsDevice* device);
|
vfsLocalDir(vfsDevice* device);
|
||||||
@ -15,4 +16,5 @@ public:
|
|||||||
virtual bool Create(const std::string& path) override;
|
virtual bool Create(const std::string& path) override;
|
||||||
virtual bool Rename(const std::string& from, const std::string& to) override;
|
virtual bool Rename(const std::string& from, const std::string& to) override;
|
||||||
virtual bool Remove(const std::string& path) override;
|
virtual bool Remove(const std::string& path) override;
|
||||||
|
virtual bool IsOpened() const override;
|
||||||
};
|
};
|
Loading…
x
Reference in New Issue
Block a user