Uses 9724K of libraries. Click here for Pure Java version (9540L/53K).
1 | import net.schmizz.sshj.xfer.InMemorySourceFile; |
2 | import net.schmizz.sshj.xfer.scp.SCPFileTransfer; |
3 | import net.schmizz.sshj.sftp.RemoteResourceInfo; |
4 | import net.schmizz.sshj.sftp.FileMode; |
5 | |
6 | // allow any host ID and search for pw in JavaX-Secret |
7 | static L<RemoteResourceInfo> scpLS(S user, S host, S remoteDir) ctex { |
8 | final SSHClient client = sshLogin(user, host); |
9 | try { |
10 | ret client.newSFTPClient().ls(remoteDir); |
11 | } finally { |
12 | sshDisconnect(client); |
13 | } |
14 | } |
Began life as a copy of #1009983
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1011852 |
Snippet name: | scpLS - list remote directory |
Eternal ID of this version: | #1011852/5 |
Text MD5: | 956843c5841380ae714f45801771d986 |
Transpilation MD5: | dd3e4836964a51838d947f7f9bf740ce |
Author: | stefan |
Category: | javax / networking |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-10-29 17:39:51 |
Source code size: | 478 bytes / 14 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 479 / 574 |
Version history: | 4 change(s) |
Referenced in: | [show references] |