/** * * this method is used to return filenames in working directory * * @return filenames * @throws KettleException */ public String[] getFileNames() throws KettleException { ArrayList<String> list = null; try { List<FTPFile> fileList = getFileList( getWorkingDirectory() ); list = new ArrayList<String>(); Iterator<FTPFile> it = fileList.iterator(); while ( it.hasNext() ) { FTPFile file = it.next(); if ( !file.isDirectory() ) { list.add( file.getName() ); } } } catch ( Exception e ) { throw new KettleException( BaseMessages.getString( PKG, "JobFTPS.Error.RetrievingFilenames" ), e ); } return list == null ? null : list.toArray( new String[list.size()] ); }
/** * * this method is used to delete a file in remote host * * @param filename * Name of file on remote host to delete * @throws KettleException */ public void deleteFile( String filename ) throws KettleException { try { this.connection.deleteFile( new FTPFile( getWorkingDirectory(), filename ) ); } catch ( Exception e ) { throw new KettleException( BaseMessages.getString( PKG, "JobFTPS.Error.DeletingFile", filename ), e ); } }
pwdFolder = ftpsclient.getWorkingDirectory();
downloadFiles( connection, connection.getWorkingDirectory(), pattern, result );
logDetailed( BaseMessages.getString( PKG, "JobEntryFTPS.LoggedIn", connection.getUserName() ) ); logDetailed( BaseMessages.getString( PKG, "JobEntryFTPS.WorkingDirectory", connection .getWorkingDirectory() ) );
logDetailed( BaseMessages.getString( PKG, "JobFTPSPUT.WorkingDirectory", connection.getWorkingDirectory() ) );