feat : add GetAllCacheFileInfosAsync method

This commit is contained in:
hevinci
2024-02-18 12:11:29 +08:00
parent 7586882a97
commit 6eb9a90a03
9 changed files with 204 additions and 65 deletions
@@ -314,28 +314,6 @@ namespace YooAsset
return _playModeImpl.PreDownloadContentAsync(packageVersion, timeout);
}
/// <summary>
/// 清理包裹未使用的缓存文件
/// </summary>
public ClearUnusedCacheFilesOperation ClearUnusedCacheFilesAsync()
{
DebugCheckInitialize();
var operation = new ClearUnusedCacheFilesOperation(this, _cacheMgr);
OperationSystem.StartOperation(PackageName, operation);
return operation;
}
/// <summary>
/// 清理包裹本地所有的缓存文件
/// </summary>
public ClearAllCacheFilesOperation ClearAllCacheFilesAsync()
{
DebugCheckInitialize();
var operation = new ClearAllCacheFilesOperation(_cacheMgr);
OperationSystem.StartOperation(PackageName, operation);
return operation;
}
/// <summary>
/// 获取本地包裹的版本信息
/// </summary>
@@ -412,6 +390,37 @@ namespace YooAsset
_persistentMgr.DeleteSandboxPackageFolder();
_cacheMgr.ClearAll();
}
/// <summary>
/// 清理包裹未使用的缓存文件
/// </summary>
public ClearUnusedCacheFilesOperation ClearUnusedCacheFilesAsync()
{
DebugCheckInitialize();
var operation = new ClearUnusedCacheFilesOperation(this, _cacheMgr);
OperationSystem.StartOperation(PackageName, operation);
return operation;
}
/// <summary>
/// 清理包裹本地所有的缓存文件
/// </summary>
public ClearAllCacheFilesOperation ClearAllCacheFilesAsync()
{
DebugCheckInitialize();
var operation = new ClearAllCacheFilesOperation(_cacheMgr);
OperationSystem.StartOperation(PackageName, operation);
return operation;
}
public GetAllCacheFileInfosOperation GetAllCacheFileInfosAsync(string packageVersion)
{
DebugCheckInitialize();
var operation = new GetAllCacheFileInfosOperation(_persistentMgr, _cacheMgr, packageVersion);
OperationSystem.StartOperation(PackageName, operation);
return operation;
}
#endregion
#region 资源信息