Now what is a FTP client without the ability to get a directory listing, getting directory listing in FTP4CHE is pretty straight forward, and the FTP response returns a list of type FTPFile.
Code
public class FTPResponse implements FTPListener { public List getDirectoryList(String path) { try { if (ftpConnection != null) { List response = ftpConnection.getFastDirectoryListing(path); return response; } else { return null; } } catch (Exception e) { return null; } } }
|
If you found this publication useful to you, then feel free to show your appreaciation towards open-source publications by doing a small donation. It only takes a moment of your time. Any donation is appreaciated – and would also motivate me to release more as open-source. Donations so far – $0 USD – See previous donations. |






