mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-09-07 21:23:29 +02:00
Add metafilesystem hook to add optimized implementations of compute recursive directory size
This commit is contained in:
@@ -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