org.apache.tools.ant.taskdefs.optional.ssh

Class ScpToMessageBySftp

public class ScpToMessageBySftp extends ScpToMessage

Utility class to carry out an upload by sftp.
Constructor Summary
ScpToMessageBySftp(boolean verbose, Session session, File aLocalFile, String aRemotePath)
Constructor for a local file to remote.
ScpToMessageBySftp(boolean verbose, Session session, List aDirectoryList, String aRemotePath)
Constructor for a local directories to remote.
ScpToMessageBySftp(Session session, File aLocalFile, String aRemotePath)
Constructor for ScpToMessage.
ScpToMessageBySftp(Session session, List aDirectoryList, String aRemotePath)
Constructor for ScpToMessage.
Method Summary
voidexecute()
Carry out the transfer.
FilegetLocalFile()
Get the local file.
StringgetRemotePath()
Get the remote path.

Constructor Detail

ScpToMessageBySftp

public ScpToMessageBySftp(boolean verbose, Session session, File aLocalFile, String aRemotePath)
Constructor for a local file to remote.

Parameters: verbose if true do verbose logging session the scp session to use aLocalFile the local file aRemotePath the remote path

Since: Ant 1.7

ScpToMessageBySftp

public ScpToMessageBySftp(boolean verbose, Session session, List aDirectoryList, String aRemotePath)
Constructor for a local directories to remote.

Parameters: verbose if true do verbose logging session the scp session to use aDirectoryList a list of directories aRemotePath the remote path

Since: Ant 1.7

ScpToMessageBySftp

public ScpToMessageBySftp(Session session, File aLocalFile, String aRemotePath)
Constructor for ScpToMessage.

Parameters: session the scp session to use aLocalFile the local file aRemotePath the remote path

ScpToMessageBySftp

public ScpToMessageBySftp(Session session, List aDirectoryList, String aRemotePath)
Constructor for ScpToMessage.

Parameters: session the scp session to use aDirectoryList a list of directories aRemotePath the remote path

Method Detail

execute

public void execute()
Carry out the transfer.

Throws: IOException on i/o errors JSchException on errors detected by scp

getLocalFile

public File getLocalFile()
Get the local file.

Returns: the local file.

getRemotePath

public String getRemotePath()
Get the remote path.

Returns: the remote path.