style : file system code style

This commit is contained in:
何冠峰
2025-07-01 11:06:41 +08:00
parent 1b0288fcd0
commit e3a12ef361
5 changed files with 7 additions and 6 deletions

View File

@@ -126,7 +126,7 @@ namespace YooAsset
public virtual FSDownloadFileOperation DownloadFileAsync(PackageBundle bundle, DownloadFileOptions options) public virtual FSDownloadFileOperation DownloadFileAsync(PackageBundle bundle, DownloadFileOptions options)
{ {
// 注意:业务层的解压下载器会依赖内置文件系统的下载方法 // 注意:业务层的解压下载器会依赖内置文件系统的下载方法
options.ImportFilePath = GetBuildinFileLoadPath(bundle); options.LocalFilePath = GetBuildinFileLoadPath(bundle);
return _unpackFileSystem.DownloadFileAsync(bundle, options); return _unpackFileSystem.DownloadFileAsync(bundle, options);
} }
public virtual FSLoadBundleOperation LoadBundleFile(PackageBundle bundle) public virtual FSLoadBundleOperation LoadBundleFile(PackageBundle bundle)

View File

@@ -84,7 +84,7 @@ namespace YooAsset
// 创建新的下载器 // 创建新的下载器
DefaultDownloadFileOperation newDownloader; DefaultDownloadFileOperation newDownloader;
if (string.IsNullOrEmpty(options.ImportFilePath)) if (string.IsNullOrEmpty(options.LocalFilePath))
{ {
// 远端下载地址 // 远端下载地址
options.MainURL = _fileSystem.RemoteServices.GetRemoteMainURL(bundle.FileName); options.MainURL = _fileSystem.RemoteServices.GetRemoteMainURL(bundle.FileName);
@@ -107,7 +107,7 @@ namespace YooAsset
else else
{ {
// 注意:把本地文件路径指定为可下载地址 // 注意:把本地文件路径指定为可下载地址
options.MainURL = DownloadSystemHelper.ConvertToWWWPath(options.ImportFilePath); options.MainURL = DownloadSystemHelper.ConvertToWWWPath(options.LocalFilePath);
options.FallbackURL = options.MainURL; options.FallbackURL = options.MainURL;
// 创建新的下载器 // 创建新的下载器

View File

@@ -24,9 +24,9 @@ namespace YooAsset
public string FallbackURL { set; get; } public string FallbackURL { set; get; }
/// <summary> /// <summary>
/// 导入的本地文件路径 /// 拷贝的本地文件路径
/// </summary> /// </summary>
public string ImportFilePath { set; get; } public string LocalFilePath { set; get; }
public DownloadFileOptions(int failedTryAgain, int timeout) public DownloadFileOptions(int failedTryAgain, int timeout)
{ {

View File

@@ -39,7 +39,7 @@ namespace YooAsset
public FSDownloadFileOperation CreateDownloader(int failedTryAgain, int timeout) public FSDownloadFileOperation CreateDownloader(int failedTryAgain, int timeout)
{ {
DownloadFileOptions options = new DownloadFileOptions(failedTryAgain, timeout); DownloadFileOptions options = new DownloadFileOptions(failedTryAgain, timeout);
options.ImportFilePath = _importFilePath; options.LocalFilePath = _importFilePath;
return _fileSystem.DownloadFileAsync(Bundle, options); return _fileSystem.DownloadFileAsync(Bundle, options);
} }

View File

@@ -21,6 +21,7 @@ namespace YooAsset
/// <summary> /// <summary>
/// 本地文件拷贝服务类 /// 本地文件拷贝服务类
/// 备注:包体内文件拷贝,沙盒内文件导入都会触发该服务!
/// </summary> /// </summary>
public interface ICopyLocalFileServices public interface ICopyLocalFileServices
{ {