internal void RenameLocalFile(FtpClient ftpClient, DFtpFile file, String newName) { DFtpFile localSelection = file; DFtpAction action = new RenameFileLocalAction(ftpClient, test_Dir, localSelection, newName); DFtpResult result = action.Run(); return; }
public DFtpResult Go() { String newName = IOHelper.AskString("Enter replacement name:"); // Create the action // Initialize it with the info we've collected DFtpAction action = new RenameFileLocalAction(Client.ftpClient, Client.localDirectory, Client.localSelection, newName); // Carry out the action and get the result DFtpResult result = action.Run(); if (result.Type == DFtpResultType.Ok) { IOHelper.Message("The file was successfully renamed to '" + newName + "'."); Client.localSelection = null; } return(result); }