Class ScpToMessage
java.lang.Object
org.apache.tools.ant.taskdefs.optional.ssh.AbstractSshMessage
org.apache.tools.ant.taskdefs.optional.ssh.ScpToMessage
-
Constructor Summary
ConstructorDescriptionScpToMessage
(boolean verbose, boolean compressed, com.jcraft.jsch.Session session) Constructor for ScpToMessageScpToMessage
(boolean verbose, boolean compressed, com.jcraft.jsch.Session session, File aLocalFile, String aRemotePath, boolean preserveLastModified) Constructor for a local file to remote.ScpToMessage
(boolean verbose, boolean compressed, com.jcraft.jsch.Session session, List<Directory> aDirectoryList, String aRemotePath, boolean preserveLastModified) Constructor for a local directories to remote.ScpToMessage
(boolean verbose, com.jcraft.jsch.Session session) Constructor for ScpToMessageScpToMessage
(boolean verbose, com.jcraft.jsch.Session session, File aLocalFile, String aRemotePath) Constructor for a local file to remote.ScpToMessage
(boolean verbose, com.jcraft.jsch.Session session, File aLocalFile, String aRemotePath, boolean preserveLastModified) Constructor for a local file to remote.ScpToMessage
(boolean verbose, com.jcraft.jsch.Session session, List<Directory> aDirectoryList, String aRemotePath) Constructor for a local directories to remote.ScpToMessage
(boolean verbose, com.jcraft.jsch.Session session, List<Directory> aDirectoryList, String aRemotePath, boolean preserveLastModified) Constructor for a local directories to remote.ScpToMessage
(com.jcraft.jsch.Session session) Constructor for ScpToMessageScpToMessage
(com.jcraft.jsch.Session session, File aLocalFile, String aRemotePath) Constructor for ScpToMessage.ScpToMessage
(com.jcraft.jsch.Session session, List<Directory> aDirectoryList, String aRemotePath) Constructor for ScpToMessage. -
Method Summary
Modifier and TypeMethodDescriptionvoid
execute()
Carry out the transfer.int
Get the dir mode.int
Get the file mode.Get the local fileboolean
Whether to preserve the last modified time.Get the remote pathvoid
setDirMode
(int dirMode) Set the dir mode, defaults to 0755.void
setFileMode
(int fileMode) Set the file mode, defaults to 0644.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
-
ScpToMessage
public ScpToMessage(com.jcraft.jsch.Session session) Constructor for ScpToMessage- Parameters:
session
- the ssh session to use
-
ScpToMessage
public ScpToMessage(boolean verbose, com.jcraft.jsch.Session session) Constructor for ScpToMessage- Parameters:
verbose
- if true do verbose loggingsession
- the ssh session to use- Since:
- Ant 1.7
-
ScpToMessage
public ScpToMessage(boolean verbose, boolean compressed, com.jcraft.jsch.Session session) Constructor for ScpToMessage- Parameters:
verbose
- if true do verbose loggingcompressed
- if true use compressionsession
- the ssh session to use- Since:
- Ant 1.9.8
-
ScpToMessage
public ScpToMessage(boolean verbose, com.jcraft.jsch.Session session, File aLocalFile, String aRemotePath, boolean preserveLastModified) Constructor for a local file to remote.- Parameters:
verbose
- if true do verbose loggingsession
- the scp session to useaLocalFile
- the local fileaRemotePath
- the remote pathpreserveLastModified
- whether to preserve the last modified timestamps- Since:
- Ant 1.9.7
-
ScpToMessage
public ScpToMessage(boolean verbose, boolean compressed, com.jcraft.jsch.Session session, File aLocalFile, String aRemotePath, boolean preserveLastModified) Constructor for a local file to remote.- Parameters:
verbose
- if true do verbose loggingcompressed
- if true use compressionsession
- the scp session to useaLocalFile
- the local fileaRemotePath
- the remote pathpreserveLastModified
- whether to preserve the last modified timestamps- Since:
- Ant 1.9.8
-
ScpToMessage
public ScpToMessage(boolean verbose, com.jcraft.jsch.Session session, List<Directory> aDirectoryList, String aRemotePath, boolean preserveLastModified) Constructor for a local directories to remote.- Parameters:
verbose
- if true do verbose loggingsession
- the scp session to useaDirectoryList
- a list of directoriesaRemotePath
- the remote pathpreserveLastModified
- whether to preserve the last modified timestamps- Since:
- Ant 1.9.7
-
ScpToMessage
public ScpToMessage(boolean verbose, boolean compressed, com.jcraft.jsch.Session session, List<Directory> aDirectoryList, String aRemotePath, boolean preserveLastModified) Constructor for a local directories to remote.- Parameters:
verbose
- if true do verbose loggingcompressed
- whether to use compressionsession
- the scp session to useaDirectoryList
- a list of directoriesaRemotePath
- the remote pathpreserveLastModified
- whether to preserve the last modified timestamps- Since:
- Ant 1.9.8
-
ScpToMessage
public ScpToMessage(boolean verbose, com.jcraft.jsch.Session session, File aLocalFile, String aRemotePath) Constructor for a local file to remote.- Parameters:
verbose
- if true do verbose loggingsession
- the scp session to useaLocalFile
- the local fileaRemotePath
- the remote path- Since:
- Ant 1.6.2
-
ScpToMessage
public ScpToMessage(boolean verbose, com.jcraft.jsch.Session session, List<Directory> aDirectoryList, String aRemotePath) Constructor for a local directories to remote.- Parameters:
verbose
- if true do verbose loggingsession
- the scp session to useaDirectoryList
- a list of directoriesaRemotePath
- the remote path- Since:
- Ant 1.6.2
-
ScpToMessage
-
ScpToMessage
-
-
Method Details
-
execute
Carry out the transfer.- Specified by:
execute
in classAbstractSshMessage
- Throws:
IOException
- on i/o errorscom.jcraft.jsch.JSchException
- on errors detected by scp
-
getLocalFile
-
getRemotePath
-
setFileMode
public void setFileMode(int fileMode) Set the file mode, defaults to 0644.- Parameters:
fileMode
- int- Since:
- Ant 1.9.5
-
getFileMode
public int getFileMode()Get the file mode.- Returns:
- int
- Since:
- Ant 1.9.5
-
setDirMode
public void setDirMode(int dirMode) Set the dir mode, defaults to 0755.- Parameters:
dirMode
- int- Since:
- Ant 1.9.5
-
getDirMode
public int getDirMode()Get the dir mode.- Returns:
- int
- Since:
- Ant 1.9.5
-
getPreserveLastModified
public boolean getPreserveLastModified()Whether to preserve the last modified time.- Returns:
- boolean
- Since:
- Ant 1.9.7
-