Finding file size and last modified of SFTP oldest file using Java

前端 未结 4 1634
悲哀的现实
悲哀的现实 2020-12-20 23:03

I\'m using JSch to get files from an SFTP server, but I\'m trying to figure out a way to only get the oldest file, and to make sure that it is not currently being written to

4条回答
  •  遥遥无期
    2020-12-21 00:03

    You can easily do this using edtFTPj/PRO, which supports SFTP.

    Simply get a directory listing, and sort the listing by date. If the oldest date isn't in the last few minutes, you can download.

提交回复
热议问题