Class ScpFromMessageBySftp
java.lang.Object
org.apache.tools.ant.taskdefs.optional.ssh.AbstractSshMessage
org.apache.tools.ant.taskdefs.optional.ssh.ScpFromMessage
org.apache.tools.ant.taskdefs.optional.ssh.ScpFromMessageBySftp
public class ScpFromMessageBySftp extends ScpFromMessage
A helper object representing an scp download.
-
Constructor Summary
Constructors Constructor Description ScpFromMessageBySftp(boolean verbose, com.jcraft.jsch.Session session, java.lang.String aRemoteFile, java.io.File aLocalFile, boolean recursive)
Constructor for ScpFromMessageBySftp.ScpFromMessageBySftp(boolean verbose, com.jcraft.jsch.Session session, java.lang.String aRemoteFile, java.io.File aLocalFile, boolean recursive, boolean preserveLastModified)
Constructor for ScpFromMessageBySftp.ScpFromMessageBySftp(com.jcraft.jsch.Session session, java.lang.String aRemoteFile, java.io.File aLocalFile, boolean recursive)
Constructor for ScpFromMessageBySftp. -
Method Summary
Modifier and Type Method Description void
execute()
Carry out the transfer.Methods inherited from class org.apache.tools.ant.taskdefs.optional.ssh.ScpFromMessage
getPreserveLastModified
Methods inherited from class org.apache.tools.ant.taskdefs.optional.ssh.AbstractSshMessage
getCompressed, getProgressMonitor, getVerbose, log, logStats, openExecChannel, openSftpChannel, sendAck, setLogListener, trackProgress, waitForAck
-
Constructor Details
-
ScpFromMessageBySftp
public ScpFromMessageBySftp(boolean verbose, com.jcraft.jsch.Session session, java.lang.String aRemoteFile, java.io.File aLocalFile, boolean recursive)Constructor for ScpFromMessageBySftp.- Parameters:
verbose
- if true log extra informationsession
- the Scp session to useaRemoteFile
- the remote file nameaLocalFile
- the local filerecursive
- if true use recursion- Since:
- Ant 1.7
-
ScpFromMessageBySftp
public ScpFromMessageBySftp(com.jcraft.jsch.Session session, java.lang.String aRemoteFile, java.io.File aLocalFile, boolean recursive)Constructor for ScpFromMessageBySftp.- Parameters:
session
- the Scp session to useaRemoteFile
- the remote file nameaLocalFile
- the local filerecursive
- if true use recursion
-
ScpFromMessageBySftp
public ScpFromMessageBySftp(boolean verbose, com.jcraft.jsch.Session session, java.lang.String aRemoteFile, java.io.File aLocalFile, boolean recursive, boolean preserveLastModified)Constructor for ScpFromMessageBySftp.- Parameters:
verbose
- if true log extra informationsession
- the Scp session to useaRemoteFile
- the remote file nameaLocalFile
- the local filerecursive
- if true use recursionpreserveLastModified
- whether to preserve file modification times- Since:
- Ant 1.8.0
-
-
Method Details
-
execute
public void execute() throws java.io.IOException, com.jcraft.jsch.JSchExceptionCarry out the transfer.- Overrides:
execute
in classScpFromMessage
- Throws:
java.io.IOException
- on i/o errorscom.jcraft.jsch.JSchException
- on errors detected by scp
-