Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有没有办法使用这个api过滤要列出的文件?例如:
ChannelSftp sftpChannel; sftpChannel.ls(path);
这列出了所有,但我想过滤以 AAA 开头的文件,例如
假设您使用JSch*,您应该能够?在path. 至少这个非官方的 JavaDoc提到了这一点:
*
?
path
该模式可以在最后一个组件中包含全局模式通配符(*或?)(即在最后一个之后/)。
/
所以试试
sftpChannel.ls(path + '/AAA*');