* @throws IOException
*/
public void copy(String source, String destination) throws IOException {
Session sess = createSession();
String serverDestPath = destination;
SFTPv3DirectoryEntry pathEntry = getDirectoryEntry(destination);
if (pathEntry.attributes.isRegularFile())
serverDestPath = serverDestPath.substring(0, serverDestPath
.lastIndexOf("/"));
SFTPv3DirectoryEntry pathEntrySource = getDirectoryEntry(source);
if (pathEntrySource.attributes.isDirectory())
return;
String copyCommand = JSimConstants.COPYSSH;
copyCommand = copyCommand.replace("%1", source);