private static string GetFullFilePath(DownloadRequest request) { if (Path.IsPathRooted(request.FilePath) == false) { return Path.Combine(Directory.GetCurrentDirectory(), request.FilePath); } return request.FilePath; }
// ----- Public methods public DownloadResponse Execute(DownloadRequest request) { CheckFile(request.FilePath); var uploader = new Uploader(_clientInformation.CurrentConnection); uploader.Upload(request.FilePath); return new DownloadResponse { RemoteFilePath = GetFullFilePath(request) }; }