namespace YooAsset
{
internal interface IFileSystem
{
///
/// 包裹名称
///
string PackageName { get; }
///
/// 文件根目录
///
string FileRoot { get; }
///
/// 文件数量
///
int FileCount { get; }
///
/// 初始化文件系统
///
FSInitializeFileSystemOperation InitializeFileSystemAsync();
///
/// 加载包裹清单
///
FSLoadPackageManifestOperation LoadPackageManifestAsync(string packageVersion, int timeout);
///
/// 查询包裹版本
///
FSRequestPackageVersionOperation RequestPackageVersionAsync(bool appendTimeTicks, int timeout);
///
/// 清理缓存文件
///
FSClearCacheFilesOperation ClearCacheFilesAsync(PackageManifest manifest, ClearCacheFilesOptions options);
///
/// 下载Bundle文件
///
FSDownloadFileOperation DownloadFileAsync(PackageBundle bundle, DownloadFileOptions options);
///
/// 加载Bundle文件
///
FSLoadBundleOperation LoadBundleFile(PackageBundle bundle);
///
/// 设置自定义参数
///
void SetParameter(string name, object value);
///
/// 创建文件系统
///
void OnCreate(string packageName, string packageRoot);
///
/// 销毁文件系统
///
void OnDestroy();
///
/// 查询文件归属
///
bool Belong(PackageBundle bundle);
///
/// 查询文件是否存在
///
bool Exists(PackageBundle bundle);
///
/// 是否需要下载
///
bool NeedDownload(PackageBundle bundle);
///
/// 是否需要解压
///
bool NeedUnpack(PackageBundle bundle);
///
/// 是否需要导入
///
bool NeedImport(PackageBundle bundle);
///
/// 获取Bundle文件路径
///
string GetBundleFilePath(PackageBundle bundle);
///
/// 读取Bundle文件的二进制数据
///
byte[] ReadBundleFileData(PackageBundle bundle);
///
/// 读取Bundle文件的文本数据
///
string ReadBundleFileText(PackageBundle bundle);
}
}