public class SftpUtils extends Object
| 构造器和说明 |
|---|
SftpUtils() |
| 限定符和类型 | 方法和说明 |
|---|---|
static com.jcraft.jsch.ChannelSftp |
connect(String host,
int port,
String username,
String password) |
void |
delete(String directory,
String deleteFile,
com.jcraft.jsch.ChannelSftp sftp) |
static void |
disconnect(com.jcraft.jsch.ChannelSftp sftp) |
void |
download(String directory,
String downloadFile,
String saveFile,
com.jcraft.jsch.ChannelSftp sftp) |
Vector |
listFiles(String directory,
com.jcraft.jsch.ChannelSftp sftp) |
static void |
upload(String directory,
File file,
String saveFile,
com.jcraft.jsch.ChannelSftp sftp) |
static void |
upload(String directory,
String uploadFile,
String saveFile,
com.jcraft.jsch.ChannelSftp sftp) |
public static com.jcraft.jsch.ChannelSftp connect(String host, int port, String username, String password)
public static void disconnect(com.jcraft.jsch.ChannelSftp sftp)
public static void upload(String directory, String uploadFile, String saveFile, com.jcraft.jsch.ChannelSftp sftp)
public static void upload(String directory, File file, String saveFile, com.jcraft.jsch.ChannelSftp sftp)
public void download(String directory, String downloadFile, String saveFile, com.jcraft.jsch.ChannelSftp sftp)
Copyright © 2023 wuyushuo. All rights reserved.