public static (IAccessLocation acb, IAccessLocation awb) ToLocation(this ISoundFileData data, IAccessPoint storage) { if (data.HasAwb()) { return(storage.ToLocation(data.Acb.Path), storage.ToLocation(data.Awb.Path)); } return(storage.ToLocation(data.Acb.Path), new UrlLocation(data.Awb.Identifier, string.Empty)); }
/// <summary> /// DL開始 /// </summary> public ILoadProcess Start(IJobEngine engine, IAccessLocation srcLocation, ICriFileData data) { // アクセス先 // 現在進行系 if (engine.HasRequest(data.Identifier)) { // 完了するまで待つ return(WaitLoadProcess.Wait(m_dlRequestDict, (dict) => dict[data.Identifier])); } // 保存先 var dstLocation = m_storage.ToLocation(data.Path); // 同時リクエスト対応 m_dlRequestDict[data.Identifier] = false; var job = DoRequest(engine, srcLocation, dstLocation, data); return(new LoadProcess <FileInfo>( job, file => { if (GetSuccessDL?.Invoke(data, file) ?? false) { // 上書き OnInstalled?.Invoke(data); // リクエスト完了とする m_dlRequestDict[data.Identifier] = true; } }, onError: code => DoError(code))); }
public IEnumerator Build(RuntimePlatform platform, IVersionManifest manifest) { m_server = m_config.GetServer(platform); m_storage = m_config.GetSaveStorage(platform); foreach (var d in GetList()) { yield return(Copy(m_server.ToLocation(d.Acb.Path), m_storage.ToLocation(d.Acb.Path))); if (d.HasAwb()) { yield return(Copy(m_server.ToLocation(d.Awb.Path), m_storage.ToLocation(d.Awb.Path))); } } yield break; }
internal void Update(ICachableBundle data, IAccessPoint dir) { BundleInfo.Apply(data); var path = dir.ToLocation(BundleInfo.Path); FileInfo = new FileInfo(path.FullPath); }
public CachedFileData(ILocalBundleData d, IAccessPoint dir) { BundleInfo = d; var path = dir.ToLocation(BundleInfo.Path); FileInfo = new FileInfo(path.FullPath); }
/// <summary> /// 出力 /// </summary> public override IEnumerator Run(string relativePath) { // パス var sourcePath = m_sourceDir.ToLocation(relativePath); var destPath = m_exportDir.ToLocation(relativePath); if (File.Exists(destPath.FullPath)) { yield break; } // リクエスト yield return(CopyFile(sourcePath.FullPath, destPath.FullPath)); }
public static IAccessLocation ToLocation(this IMovieFileData self, IAccessPoint storage) { return(storage.ToLocation(self.Path)); }
/// <summary> /// 場所の取得 /// </summary> public IAccessLocation GetSaveLocation(ICachableBundle data) { return(m_saveDirRoot.ToLocation(data.Path)); }