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:
Unknown W. Brackets
2022-10-09 14:42:31 -07:00
parent 7b8350f8a8
commit 4942692558
11 changed files with 66 additions and 29 deletions
+3 -1
View File
@@ -30,9 +30,11 @@ void BlobFileSystem::DoState(PointerWrap &p) {
// Not used in real emulation.
}
std::vector<PSPFileInfo> BlobFileSystem::GetDirListing(std::string path) {
std::vector<PSPFileInfo> BlobFileSystem::GetDirListing(const std::string &path, bool *exists) {
std::vector<PSPFileInfo> listing;
listing.push_back(GetFileInfo(alias_));
if (exists)
*exists = true;
return listing;
}