mirror of
https://github.com/hierynomus/sshj.git
synced 2025-12-06 15:20:54 +03:00
Some documentation on the FileTransfer interface.
This commit is contained in:
@@ -19,15 +19,53 @@ import java.io.IOException;
|
|||||||
|
|
||||||
public interface FileTransfer {
|
public interface FileTransfer {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is meant to delegate to {@link #upload(LocalSourceFile, String)} with the {@code localPath} wrapped as e.g.
|
||||||
|
* a {@link FileSystemFile}.
|
||||||
|
*
|
||||||
|
* @param localPath
|
||||||
|
* @param remotePath
|
||||||
|
*
|
||||||
|
* @throws IOException
|
||||||
|
*/
|
||||||
void upload(String localPath, String remotePath)
|
void upload(String localPath, String remotePath)
|
||||||
throws IOException;
|
throws IOException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is meant to delegate to {@link #download(String, LocalDestFile)} with the {@code localPath} wrapped as e.g.
|
||||||
|
* a {@link FileSystemFile}.
|
||||||
|
*
|
||||||
|
* @param localPath
|
||||||
|
* @param remotePath
|
||||||
|
*
|
||||||
|
* @throws IOException
|
||||||
|
*/
|
||||||
void download(String remotePath, String localPath)
|
void download(String remotePath, String localPath)
|
||||||
throws IOException;
|
throws IOException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Upload {@code localFile} to {@code remotePath}.
|
||||||
|
* <p/>
|
||||||
|
* Attributes will be set on {@code remotePath} based on the {@code localFile}.
|
||||||
|
*
|
||||||
|
* @param localFile
|
||||||
|
* @param remotePath
|
||||||
|
*
|
||||||
|
* @throws IOException
|
||||||
|
*/
|
||||||
void upload(LocalSourceFile localFile, String remotePath)
|
void upload(LocalSourceFile localFile, String remotePath)
|
||||||
throws IOException;
|
throws IOException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Download {@code remotePath} to {@code localFile}.
|
||||||
|
* <p/>
|
||||||
|
* Attributes will be set on {@code localFile} based on the {@code remotePath}'s attributes.
|
||||||
|
*
|
||||||
|
* @param localFile
|
||||||
|
* @param remotePath
|
||||||
|
*
|
||||||
|
* @throws IOException
|
||||||
|
*/
|
||||||
void download(String remotePath, LocalDestFile localFile)
|
void download(String remotePath, LocalDestFile localFile)
|
||||||
throws IOException;
|
throws IOException;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user