An aggregate of file transfer operations. Operations should follow the logging convention, that is, it should write a log as DEBUG on beginning of an operation, it should write a log as INFO on success of an operation, but it does not need to write an INFO log if it is an internal operation.
| Constructor and description |
|---|
SftpOperations
(Remote remote1, com.jcraft.jsch.ChannelSftp channel1) |
| Type | Name and description |
|---|---|
void |
cd(java.lang.String remotePath)Change current directory. |
void |
getContent(java.lang.String remotePath, java.io.OutputStream stream)Get a content from the remote host. |
void |
getFile(java.lang.String remotePath, java.lang.String localPath)Get a file from the remote host. |
java.util.List<ChannelSftp.LsEntry> |
ls(java.lang.String remotePath)Get a directory listing. |
void |
mkdir(java.lang.String remotePath)Create a directory. |
void |
putContent(java.io.InputStream stream, java.lang.String remotePath)Put a content to the remote host. |
void |
putFile(java.lang.String localPath, java.lang.String remotePath)Put a file to the remote host. |
void |
rm(java.lang.String remotePath)Removes one or several files. |
void |
rmdir(java.lang.String remotePath)Removes one or several directories. |
com.jcraft.jsch.SftpATTRS |
stat(java.lang.String remotePath)Get a directory entry. |
| Methods inherited from class | Name |
|---|---|
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Change current directory.
Get a content from the remote host.
Get a file from the remote host.
Get a directory listing.
Create a directory.
Put a content to the remote host.
remotePath - pathPut a file to the remote host.
Removes one or several files.
Removes one or several directories.
Get a directory entry.