Jsch获取文件夹下所有文件列表
时间: 2023-09-07 13:16:39 浏览: 184
通过JSch获取文件夹下所有文件列表的方法是使用ChannelSftp的ls方法。ls方法有两个重载的版本,分别是public java.util.Vector ls(String path) throws SftpException和public void ls(String path, LsEntrySelector selector) throws SftpException。通过调用这两个方法,可以获取指定路径下的文件列表。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [java使用Jsch来获取sftp上指定文件名的文件](https://blog.csdn.net/DoranHex/article/details/118025406)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"]
- *2* *3* [java中使用jsch向服务器传输文件或文件夹](https://blog.csdn.net/nich002/article/details/113727558)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文