public override void Run() { jobToDownload.Status = Job.DownloadStatus.Downloading; downloader.Output.AddLine(STARTING_LINE); createTemporaryDirectory(); createProcess(ArgumentsGenerator.GenerateDownloadArguments(jobToDownload)); executeProcess(); handleOutputs(); deleteTemporaryDirectory(); downloader.Output.AddLine(ENDING_LINE); downloader.Output.AddEmptyLine(); jobToDownload.Status = Job.DownloadStatus.Finished; downloader.IsAvailable = true; }
public DownloadCommand(Downloader downloader, Job job) : base(downloader) { jobToDownload = job; temporaryDirectoryPath = ArgumentsGenerator.getTemporaryDir(jobToDownload.Options.OutputDir); }