ftplib is a java library that you can use to make an ftp client
- Both Active and Passive mode supported
- Search files by regex to get a files in a tree structure
- Download files/folders by regex
import com.jayanthag.ftp.FTPClient;
...
...
...
FTPClient ftpClient = new FTPClient(host, port);
ftpClient.connect();
ftpClient.login(username, password);
...
...
ftpClient.stopClient(); import com.jayanthag.ftp.models.FileElement;
...
5614
...
...
ArrayList<FileElement> files = ftpClient.ls();
/* a FileElement object represents a folder/file,
it may hold references to files/folders inside itself,
and also to its parent
/* ...
...
...
ftpClient.regexDownload(".py$");