增加ftp服务器标志
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user