/**
* Constructor for a local file to remote.
* @param verbose if true do verbose logging
* @param session the scp session to use
* @param aLocalFile the local file
* @param aRemotePath the remote path
* @since Ant 1.6.2
*/
/**
* Constructor for a local file to remote.
* @param verbose if true do verbose logging
* @param session the scp session to use
* @param aLocalFile the local file
* @param aRemotePath the remote path
* @since Ant 1.7
*/
public [[#variablef750640]](boolean verbose, Session session, File aLocalFile, String aRemotePath) {
this(verbose, session, aRemotePath);
this.localFile = aLocalFile;
}
/**
* Constructor for a local directories to remote.
* @param verbose if true do verbose logging
* @param session the scp session to use
* @param aDirectoryList a list of directories
* @param aRemotePath the remote path
* @since Ant 1.6.2
*/
/**
* Constructor for a local directories to remote.
* @param verbose if true do verbose logging
* @param session the scp session to use
* @param aDirectoryList a list of directories
* @param aRemotePath the remote path
* @since Ant 1.7
*/
public [[#variablef750640]](boolean verbose, Session session, List aDirectoryList, String aRemotePath) {
this(verbose, session, aRemotePath);
this.directoryList = aDirectoryList;
}
/**
* Constructor for ScpToMessage.
* @param verbose if true do verbose logging
* @param session the scp session to use
* @param aRemotePath the remote path
* @since Ant 1.6.2
*/
private [[#variablef750640]](boolean verbose, Session session, String aRemotePath) {
super(verbose, session);
this.remotePath = aRemotePath;
}
/**
* Constructor for ScpToMessage.
* @param session the scp session to use
* @param aLocalFile the local file
* @param aRemotePath the remote path
*/
public [[#variablef750640]](Session session, File aLocalFile, String aRemotePath) {
this(false, session, aLocalFile, aRemotePath);
}
/**
* Constructor for ScpToMessage.
* @param session the scp session to use
* @param aDirectoryList a list of directories
* @param aRemotePath the remote path
*/
public [[#variablef750640]](Session session, List aDirectoryList, String aRemotePath) {
this(false, session, aDirectoryList, aRemotePath);
}
/**
* Carry out the transfer.
* @throws IOException on i/o errors
* @throws JSchException on errors detected by scp
*/
public void execute() throws IOException, JSchException {
if (directoryList != null) {
doMultipleTransfer();
}
if (localFile != null) {
doSingleTransfer();
}
log("done.\n");
}
|