Package | Description |
---|---|
org.dromara.hutool.extra.ftp |
基于Apache Commons Net封装的FTP工具
|
Modifier and Type | Method and Description |
---|---|
CommonsFtp |
CommonsFtp.init()
初始化连接
|
CommonsFtp |
CommonsFtp.init(FtpConfig config,
FtpMode mode)
初始化连接
|
static CommonsFtp |
CommonsFtp.of(Connector connector,
Charset charset)
构造
|
static CommonsFtp |
CommonsFtp.of(Connector connector,
Charset charset,
String serverLanguageCode,
String systemKey)
构造
|
static CommonsFtp |
CommonsFtp.of(Connector connector,
Charset charset,
String serverLanguageCode,
String systemKey,
FtpMode mode)
构造
|
static CommonsFtp |
CommonsFtp.of(String host)
构造CommonsFtp,匿名登录
|
static CommonsFtp |
CommonsFtp.of(String host,
int port)
构造,匿名登录
|
static CommonsFtp |
CommonsFtp.of(String host,
int port,
String user,
String password)
构造
|
CommonsFtp |
CommonsFtp.reconnectIfTimeout()
如果连接超时的话,重新进行连接 经测试,当连接超时时,client.isConnected()仍然返回ture,无法判断是否连接超时 因此,通过发送pwd命令的方式,检查连接是否超时
|
CommonsFtp |
CommonsFtp.setBackToPwd(boolean backToPwd)
设置执行完操作是否返回当前目录
|
CommonsFtp |
CommonsFtp.setMode(FtpMode mode)
设置FTP连接模式,可选主动和被动模式
|
Copyright © 2025. All rights reserved.