public class SftpCommand extends Object implements Channel
| Modifier and Type | Class and Description |
|---|---|
static interface |
SftpCommand.CommandExecutor |
| Modifier and Type | Field and Description |
|---|---|
static String |
SFTP_PORT_OPTION
Command line option used to indicate a non-default port number
|
| Constructor and Description |
|---|
SftpCommand(SftpClient client) |
| Modifier and Type | Method and Description |
|---|---|
protected <A extends Appendable> |
appendFileAttributes(A stdout,
SftpClient sftp,
String path,
SftpClient.Attributes attrs) |
static <A extends Appendable> |
appendInfoValue(A sb,
CharSequence name,
Object value) |
void |
close() |
void |
doInteractive(BufferedReader stdin,
PrintStream stdout,
PrintStream stderr) |
SftpClient |
getClient() |
String |
getCurrentLocalDirectory() |
String |
getCurrentRemoteDirectory() |
boolean |
isOpen() |
static void |
main(String[] args) |
protected String |
resolveLocalPath(String pathArg) |
protected String |
resolveRemotePath(String pathArg) |
void |
setCurrentLocalDirectory(String path) |
void |
setCurrentRemoteDirectory(String path) |
public static final String SFTP_PORT_OPTION
public SftpCommand(SftpClient client)
public final SftpClient getClient()
public void doInteractive(BufferedReader stdin, PrintStream stdout, PrintStream stderr) throws Exception
Exceptionprotected <A extends Appendable> A appendFileAttributes(A stdout, SftpClient sftp, String path, SftpClient.Attributes attrs) throws IOException
IOExceptionpublic String getCurrentRemoteDirectory()
public void setCurrentRemoteDirectory(String path)
public String getCurrentLocalDirectory()
public void setCurrentLocalDirectory(String path)
public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in interface ChannelIOExceptionpublic static <A extends Appendable> A appendInfoValue(A sb, CharSequence name, Object value) throws IOException
IOExceptionCopyright © 2008–2017 The Apache Software Foundation. All rights reserved.