java sftp & ftp client library that support file and dir monitoring [closed]

。_饼干妹妹 提交于 2020-08-26 11:32:06

问题


Please recommend me some java client library for sftp and ftp that support directory monitoring.

Thank you.


回答1:


The most complete is probably Jakarta Commons Net: http://commons.apache.org/net/




回答2:


There is no FTP command for monitoring a directory. Your application will need to connect, request the directory listing and cache it. Then, periodically, connect, fetch a new listing, and compare it to the cached listing.

Note that FTP servers generally will not let you sit there with an idle connection. So, the proper behavior is to disconnect between checks of the listing.




回答3:


There is an open source library rdp4j which allows to poll for any remote directory.

All that you have to do is to implement adapter for reading from FTP or SFTP server.




回答4:


edtFTPj/PRO is a commercial Java client library that supports SFTP, FTP and FTPS (and SCP).

As another answer notes, you will need to periodically compare the latest listing with the previous one (disconnecting in between attempts).



来源:https://stackoverflow.com/questions/2139747/java-sftp-ftp-client-library-that-support-file-and-dir-monitoring

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!