增加ftp服务器标志

This commit is contained in:
laoyuyu
2019-12-28 13:14:49 +08:00
parent 685f6b5525
commit bfc2cff5b0
98 changed files with 444 additions and 19650 deletions

View File

@@ -91,7 +91,7 @@ public abstract class AbsFtpInfoThread<ENTITY extends AbsEntity, TASK_WRAPPER ex
}
String remotePath = CommonUtil.convertFtpChar(charSet, getRemotePath());
FTPFile[] files = client.listFiles(remotePath);
FTPFile[] files = client.listFiles(getRemotePath());
boolean isExist = files.length != 0;
if (!isExist && !isUpload) {
int i = remotePath.lastIndexOf(File.separator);

View File

@@ -72,6 +72,15 @@ public class FtpTaskOption implements ITaskOption {
*/
private String activeExternalIPAddress;
//---------------- ftp client 配置信息 start
private String defaultDateFormatStr = null;
private String recentDateFormatStr = null;
private String serverLanguageCode = null;
private String shortMonthNames = null;
private String serverTimeZoneId = null;
private String systemKey = FTPClientConfig.SYST_UNIX;
//---------------- ftp client 配置信息 end
public String getActiveExternalIPAddress() {
return activeExternalIPAddress;
}
@@ -105,6 +114,24 @@ public class FtpTaskOption implements ITaskOption {
}
public FTPClientConfig getClientConfig() {
if (clientConfig == null) {
clientConfig = new FTPClientConfig(systemKey);
if (defaultDateFormatStr != null) {
clientConfig.setDefaultDateFormatStr(defaultDateFormatStr);
}
if (recentDateFormatStr != null) {
clientConfig.setRecentDateFormatStr(recentDateFormatStr);
}
if (serverLanguageCode != null) {
clientConfig.setServerLanguageCode(serverLanguageCode);
}
if (shortMonthNames != null) {
clientConfig.setShortMonthNames(shortMonthNames);
}
if (serverTimeZoneId != null) {
clientConfig.setServerTimeZoneId(serverTimeZoneId);
}
}
return clientConfig;
}