private void initializeRemoteTargetDirectory() { JwFtpClient logFtpClient = null; try { logFtpClient = AcFtpClient.getLogFtpClient(); JwList<String> v = logFtpClient.getDirectoryNames(getTargetRootPath()); if (!v.contains(getLocalHostname())) logFtpClient.createDir(getTargetLogPath()); } finally { if (logFtpClient != null) logFtpClient.close(); } }
private void ftpMissingLogs( JwList<String> missingFilenames, String targetPath, String sourcePath) { JwFtpClient logFtpClient = null; try { logFtpClient = AcFtpClient.getLogFtpClient(); for (String e : missingFilenames) { String sourceFilename = JwUtility.joinPath(sourcePath, e); String targetFilename = JwUtility.joinPath(targetPath, e); logFtpClient.put(targetFilename, sourceFilename); } } finally { if (logFtpClient != null) logFtpClient.close(); } }
private JwList<String> getFtpFilenames(String path) { JwFtpClient logFtpClient = AcFtpClient.getLogFtpClient(); return AcFtpClient.getFileNames(logFtpClient, path); }