开发者

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

开发者 https://www.devze.com 2022-12-18 07:19 出处:网络
Closed. This question does not meet Stack Over开发者_开发问答flow guidelines. It is not currently accepting answers.
Closed. This question does not meet Stack Over开发者_开发问答flow guidelines. It is not currently accepting answers.

We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.

Closed 7 years ago.

Improve this question

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

Thank you.


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.


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.


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).


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

0

精彩评论

暂无评论...
验证码 换一张
取 消