mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-23 03:09:10 +02:00
Add metafilesystem hook to add optimized implementations of compute recursive directory size
This commit is contained in:
1 parent
e842d395fa
commit
48310d15a9
11 files changed
+88
-13
No files matched your search
@@ -136,5 +136,19 @@ public:
|
||||
startingDirectory = dir;
|
||||
}
|
||||
|
||||
u64 getDirSize(const std::string &dirPath);
|
||||
int64_t ComputeRecursiveDirectorySize(const std::string &dirPath);
|
||||
|
||||
// Shouldn't ever be called, but meh.
|
||||
bool ComputeRecursiveDirSizeIfFast(const std::string &path, int64_t *size) override {
|
||||
int64_t sizeTemp = ComputeRecursiveDirectorySize(path);
|
||||
if (sizeTemp >= 0) {
|
||||
*size = sizeTemp;
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
int64_t RecursiveSize(const std::string &dirPath);
|
||||
};
|
||||
Reference in new issue
Block a user