Package net.schmizz.sshj.xfer.scp
Class SCPUploadClient
java.lang.Object
net.schmizz.sshj.xfer.scp.AbstractSCPClient
net.schmizz.sshj.xfer.scp.SCPUploadClient
Support for uploading files over a connected link using SCP.
-
Field Summary
FieldsFields inherited from class net.schmizz.sshj.xfer.scp.AbstractSCPClient
bandwidthLimit, engine
-
Constructor Summary
ConstructorsConstructorDescriptionSCPUploadClient
(SCPEngine engine) SCPUploadClient
(SCPEngine engine, int bandwidthLimit) -
Method Summary
Modifier and TypeMethodDescriptionint
copy
(LocalSourceFile sourceFile, String remotePath) Upload a local file fromlocalFile
totargetPath
on the remote host.int
copy
(LocalSourceFile sourceFile, String remotePath, ScpCommandLine.EscapeMode escapeMode) int
copy
(LocalSourceFile sourceFile, String remotePath, ScpCommandLine.EscapeMode escapeMode, boolean preserveTimes) int
copy
(LocalSourceFile sourceFile, String remotePath, ScpCommandLine.EscapeMode escapeMode, ScpCommandLine commandLine) private String
private void
private void
process
(TransferListener listener, LocalSourceFile f, boolean preserveTimes) private void
sendDirectory
(TransferListener listener, LocalSourceFile f, boolean preserveTimes) private void
sendFile
(StreamCopier.Listener listener, LocalSourceFile f, boolean preserveTimes) void
setUploadFilter
(LocalFileFilter uploadFilter) private void
startCopy
(LocalSourceFile sourceFile, ScpCommandLine commandLine)
-
Field Details
-
uploadFilter
-
-
Constructor Details
-
Method Details
-
copy
Upload a local file fromlocalFile
totargetPath
on the remote host.- Throws:
IOException
-
copy
public int copy(LocalSourceFile sourceFile, String remotePath, ScpCommandLine.EscapeMode escapeMode) throws IOException - Throws:
IOException
-
copy
public int copy(LocalSourceFile sourceFile, String remotePath, ScpCommandLine.EscapeMode escapeMode, boolean preserveTimes) throws IOException - Throws:
IOException
-
copy
public int copy(LocalSourceFile sourceFile, String remotePath, ScpCommandLine.EscapeMode escapeMode, ScpCommandLine commandLine) throws IOException - Throws:
IOException
-
setUploadFilter
-
startCopy
- Throws:
IOException
-
process
private void process(TransferListener listener, LocalSourceFile f, boolean preserveTimes) throws IOException - Throws:
IOException
-
sendDirectory
private void sendDirectory(TransferListener listener, LocalSourceFile f, boolean preserveTimes) throws IOException - Throws:
IOException
-
sendFile
private void sendFile(StreamCopier.Listener listener, LocalSourceFile f, boolean preserveTimes) throws IOException - Throws:
IOException
-
preserveTimeIfPossible
- Throws:
IOException
-
getPermString
- Throws:
IOException
-