internal void GetFileFromRemoteServer(FtpClient ftpClient, String localDirectory, DFtpFile file, String remoteDirectory = "/") { DFtpFile remoteSelection = file; DFtpAction action = new GetFileFromRemoteServerAction(ftpClient, localDirectory, remoteDirectory, remoteSelection); DFtpResult result = action.Run(); return; }
public DFtpResult Go() { // Create the action // Initialize it with the info we've collected DFtpAction action = new GetFileFromRemoteServerAction(Client.ftpClient, Client.localDirectory, Client.remoteDirectory, Client.remoteSelection); // Carry out the action and get the result DFtpResult result = action.Run(); // Give some feedback if successful if (result.Type == DFtpResultType.Ok) { IOHelper.Message("The file '" + Client.remoteSelection.GetName() + "' downloaded successfully."); } // Return the result after running. return(result); }