mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-29 01:03:41 +01:00
Io: Provide directory existence with listing.
Sometimes, you need to tell the difference between an empty directory and one that doesn't exist at all. We can do this in a single call.
This commit is contained in:
1 parent
7b8350f8a8
commit
4942692558
11 files changed
+66
-29
No files matched your search
@@ -33,7 +33,7 @@ public:
|
||||
~ISOFileSystem();
|
||||
|
||||
void DoState(PointerWrap &p) override;
|
||||
std::vector<PSPFileInfo> GetDirListing(std::string path) override;
|
||||
std::vector<PSPFileInfo> GetDirListing(const std::string &path, bool *exists = nullptr) override;
|
||||
int OpenFile(std::string filename, FileAccess access, const char *devicename = nullptr) override;
|
||||
void CloseFile(u32 handle) override;
|
||||
size_t ReadFile(u32 handle, u8 *pointer, s64 size) override;
|
||||
@@ -110,7 +110,11 @@ public:
|
||||
isoFileSystem_->DoState(p);
|
||||
}
|
||||
|
||||
std::vector<PSPFileInfo> GetDirListing(std::string path) override { return std::vector<PSPFileInfo>(); }
|
||||
std::vector<PSPFileInfo> GetDirListing(const std::string &path, bool *exists = nullptr) override {
|
||||
if (exists)
|
||||
*exists = true;
|
||||
return std::vector<PSPFileInfo>();
|
||||
}
|
||||
int OpenFile(std::string filename, FileAccess access, const char *devicename = nullptr) override {
|
||||
return isoFileSystem_->OpenFile("", access, devicename);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user