com.mindbright.ssh
public class SSHRemoteFileBrowsingConsole extends com.isnetworks.ssh.AbstractFileBrowser implements ExpectOutputStream.Expector
Constructor and Description |
---|
SSHRemoteFileBrowsingConsole(com.isnetworks.ssh.FileDisplayControl fileDisplay,
java.lang.String remoteLSCommand,
SSHConsoleRemote remote,
java.lang.String cwd) |
Modifier and Type | Method and Description |
---|---|
void |
changeDirectory(java.lang.String directoryName)
Does a "cd" on the remote machine
|
void |
closed(ExpectOutputStream out,
byte[] buf,
int len)
This function is called when the data stream is closed.
|
void |
delete(com.isnetworks.ssh.FileListItem[] fileListItem)
Does a "rmdir" for directories in the array and a "rm" for files
Will not delete non-empty directories
|
void |
disconnect()
Shut down the connection to the remote machine if it's active
|
void |
doCommand(java.lang.StringBuilder command) |
void |
fileDoubleClicked(com.isnetworks.ssh.FileListItem fileListItem)
User double clicked on a file in the list.
|
void |
initialize()
Kick up a new connection to the remote machine, killing the current
one if it's still active
|
void |
makeDirectory(java.lang.String directoryName)
Executes a "mkdir" on the remote machine
|
void |
reached(ExpectOutputStream out,
byte[] buf,
int len)
This function is called whenever the expected string is
found in the data stream.
|
void |
refresh()
Rather ugly way to get the current directory on the server and a list
of files
|
void |
rename(com.isnetworks.ssh.FileListItem oldFile,
java.lang.String newName)
Executes a "mv" on the remote machine
|
public SSHRemoteFileBrowsingConsole(com.isnetworks.ssh.FileDisplayControl fileDisplay, java.lang.String remoteLSCommand, SSHConsoleRemote remote, java.lang.String cwd)
public void initialize() throws java.lang.Exception
initialize
in interface com.isnetworks.ssh.FileBrowser
java.lang.Exception
public void disconnect()
disconnect
in interface com.isnetworks.ssh.FileBrowser
disconnect
in class com.isnetworks.ssh.AbstractFileBrowser
public void refresh() throws java.lang.Exception
refresh
in interface com.isnetworks.ssh.FileBrowser
java.lang.Exception
public void makeDirectory(java.lang.String directoryName) throws java.lang.Exception
makeDirectory
in interface com.isnetworks.ssh.FileBrowser
java.lang.Exception
public void rename(com.isnetworks.ssh.FileListItem oldFile, java.lang.String newName) throws java.lang.Exception
rename
in interface com.isnetworks.ssh.FileBrowser
java.lang.Exception
public void changeDirectory(java.lang.String directoryName) throws java.lang.Exception
changeDirectory
in interface com.isnetworks.ssh.FileBrowser
java.lang.Exception
public void delete(com.isnetworks.ssh.FileListItem[] fileListItem) throws java.lang.Exception
delete
in interface com.isnetworks.ssh.FileBrowser
java.lang.Exception
public void doCommand(java.lang.StringBuilder command) throws java.lang.Exception
java.lang.Exception
public void fileDoubleClicked(com.isnetworks.ssh.FileListItem fileListItem) throws java.lang.Exception
fileDoubleClicked
in interface com.isnetworks.ssh.FileBrowser
java.lang.Exception
public void reached(ExpectOutputStream out, byte[] buf, int len)
ExpectOutputStream.Expector
reached
in interface ExpectOutputStream.Expector
out
- the stream this happened on.buf
- a buffer containing all the data which has been
seen on the stream since the last time
reached
was called. Note that the
buffer may be bigger than needed.len
- how many bytes of data there is in the buffer.public void closed(ExpectOutputStream out, byte[] buf, int len)
ExpectOutputStream.Expector
closed
in interface ExpectOutputStream.Expector
out
- the stream this happened on.buf
- a buffer containing all the data which has been
seen on the stream since the last time
reached
was called. Note that the
buffer may be bigger than needed.len
- how many bytes of data there is in the buffer.