private static Task HandleCopyFileInternal(IAbsoluteFilePath file, IAbsoluteFilePath dst, ITProgress status) { if (Common.Flags.Verbose) { MainLog.Logger.Info($"Copying {file} to {dst}"); } dst.MakeSureParentPathExists(); return(file.CopyAsync(dst, status: status)); }
async Task DownloadFileAsync(string remoteFile, IAbsoluteFilePath destinationPath, IMirrorSelector scoreMirrorSelector, CancellationToken token, Func <IAbsoluteFilePath, bool> confirmValidity, ITransferStatus status) { destinationPath.MakeSureParentPathExists(); using (var dl = _createMultiMirrorFileDownloader(scoreMirrorSelector)) { await dl.Value.DownloadAsync(new MultiMirrorFileDownloadSpec(remoteFile, destinationPath, confirmValidity) { CancellationToken = token, Progress = status }, token).ConfigureAwait(false); } }
public Task DownloadFileAsync(Uri uri, IAbsoluteFilePath localFile) { localFile.MakeSureParentPathExists(); return _downloader.DownloadAsync(uri, localFile); }
public Task DownloadFileAsync(Uri uri, IAbsoluteFilePath localFile) { localFile.MakeSureParentPathExists(); return(_downloader.DownloadAsync(uri, localFile)); }
async Task DownloadFileAsync(string remoteFile, IAbsoluteFilePath destinationPath, IMirrorSelector scoreMirrorSelector, CancellationToken token, Func<IAbsoluteFilePath, bool> confirmValidity, ITransferStatus status) { destinationPath.MakeSureParentPathExists(); using (var dl = _createMultiMirrorFileDownloader(scoreMirrorSelector)) { await dl.Value.DownloadAsync(new MultiMirrorFileDownloadSpec(remoteFile, destinationPath, confirmValidity) { CancellationToken = token, Progress = status }, token).ConfigureAwait(false); } }