protected override async Task ExecuteCore() { if (fileSystemOperations.DirectoryExists(destination)) { return; } var stream = await downloader.GetStream(url, progressObserver); await extractor.ExtractToFolder(stream, destination); }
public async Task Execute() { if (Directory.Exists(folderPath)) { Log.Warning("{Pack} was already downloaded. Skipping download.", repository); return; } var openZipStream = await downloader.OpenZipStream(downloadUrl); using (var stream = openZipStream) { await extractor.ExtractToFolder(stream, folderPath); } }
public async Task Execute() { if (Directory.Exists(folderPath)) { Log.Warning("{Pack} was already downloaded. Skipping download.", artifactName); return; } var artifact = await buildClient.LatestBuildArtifact(org, project, definitionId, artifactName); using (var httpClient = new HttpClient()) { var stream = await httpClient.GetStreamAsync(artifact.Resource.DownloadUrl); await extractor.ExtractToFolder(stream, folderPath); } }