Add clear unused cache files method.

增加清空缓存文件的方法。
This commit is contained in:
hevinci
2022-05-02 15:03:36 +08:00
parent 2c9819762a
commit 873d873194
12 changed files with 191 additions and 162 deletions
@@ -112,7 +112,7 @@ namespace YooAsset
{
if (_cachedHashList.ContainsKey(hash))
{
string filePath = SandboxHelper.MakeSandboxCacheFilePath(hash);
string filePath = SandboxHelper.MakeCacheFilePath(hash);
if (File.Exists(filePath))
{
return true;
@@ -150,7 +150,7 @@ namespace YooAsset
}
public static bool CheckContentIntegrity(PatchBundle patchBundle)
{
string filePath = SandboxHelper.MakeSandboxCacheFilePath(patchBundle.Hash);
string filePath = SandboxHelper.MakeCacheFilePath(patchBundle.Hash);
return CheckContentIntegrity(filePath, patchBundle.SizeBytes, patchBundle.CRC);
}
public static bool CheckContentIntegrity(string filePath, long size, string crc)