Show the filesystem types and origins in the list (except ISO)

This commit is contained in:
Henrik Rydgård committed 2024-11-26 00:36:58 +01:00
1 parent e95d9b15b4
commit 1eadea2589
10 files changed
+29 -13

No files matched your search

+5 -2
View File
@@ -43,7 +43,7 @@ public:
bool OwnsHandle(u32 handle) override;
int Ioctl(u32 handle, u32 cmd, u32 indataPtr, u32 inlen, u32 outdataPtr, u32 outlen, int &usec) override;
PSPDevType DevType(u32 handle) override;
FileSystemFlags Flags() override;
FileSystemFlags Flags() const override;
u64 FreeDiskSpace(const std::string &path) override { return 0; }
size_t WriteFile(u32 handle, const u8 *pointer, s64 size) override;
@@ -55,6 +55,7 @@ public:
bool RemoveFile(const std::string &filename) override { return false; }
bool ComputeRecursiveDirSizeIfFast(const std::string &path, int64_t *size) override { return false; }
void Describe(char *buf, size_t size) const override { snprintf(buf, size, "ISO"); } // TODO: Ask the fileLoader about the origins
private:
struct TreeEntry {
@@ -145,7 +146,7 @@ public:
PSPDevType DevType(u32 handle) override {
return isoFileSystem_->DevType(handle);
}
FileSystemFlags Flags() override { return isoFileSystem_->Flags(); }
FileSystemFlags Flags() const override { return isoFileSystem_->Flags(); }
u64 FreeDiskSpace(const std::string &path) override { return isoFileSystem_->FreeDiskSpace(path); }
size_t WriteFile(u32 handle, const u8 *pointer, s64 size) override {
@@ -161,6 +162,8 @@ public:
bool ComputeRecursiveDirSizeIfFast(const std::string &path, int64_t *size) override { return false; }
void Describe(char *buf, size_t size) const override { snprintf(buf, size, "ISOBlock"); }
private:
std::shared_ptr<IFileSystem> isoFileSystem_;
};