Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

15
LINES

< > BotCompany Repo | #1018545 // Download whole botcompany.de:backup directory by SCP

JavaX source code (desktop) [tags: use-pretranspiled] - run with: x30.jar

Download Jar. Uses 9724K of libraries. Click here for Pure Java version (2857L/19K).

!7

sS user = "root", host = "botcompany.de";

p {
  scpDownloadDir(user, host, "/root/backup", javaxBackupDir("botcompany.de"));
}

svoid scpDownloadDir(S user, S host, S dir, File localDir) {
  for (RemoteResourceInfo info : scpLS(user, host, dir))
    if (info.isRegularFile())
      scpDownload(user, host, info.getPath(), localDir);
    else
      pcall { scpDownloadDir(user, host, addSlash(dir) + info.getName(), newFile(localDir, info.getName())); }
}

Author comment

Began life as a copy of #1011873

download  show line numbers  debug dex  old transpilations   

Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1018545
Snippet name: Download whole botcompany.de:backup directory by SCP
Eternal ID of this version: #1018545/5
Text MD5: 7fcfa9e2d17bdd9a5f64c71571d5523b
Transpilation MD5: c419602394c66e2911d0aa72b23f37be
Author: stefan
Category: javax / networking
Type: JavaX source code (desktop)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-09-10 00:48:54
Source code size: 473 bytes / 15 lines
Pitched / IR pitched: No / No
Views / Downloads: 377 / 974
Version history: 4 change(s)
Referenced in: [show references]