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

17
LINES

< > BotCompany Repo | #1009984 // Test scpUploadWithMkdirs with tinybrain.de [OK!]

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

Uses 9700K of libraries. Click here for Pure Java version (16519L/118K/406K).

!7

static S host = "tinybrain.de";
static S user = "root";
static S remotePath = "/tmp/hello/testfile.txt";

p-tt {
  print("Connecting to " + host + " as " + user + "...");
  byte[] data = toUtf8("Hello world!");
  print("Uploading to: " + remotePath);
  scpUploadWithMkdirs(user, host, remotePath, l(data), new ByteArrayInputStream(data));
  print("Done! Listing...");
  print(quickSSH2(user, host, "ls -l " + bashQuote(remotePath), 30));
  print("Printing file");
  assertEqualsVerbose("Hello world!", quickSSH2(user, host, "cat " + bashQuote(remotePath), 30));
  print("OK!");
}

Author comment

Began life as a copy of #1009982

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1009984
Snippet name: Test scpUploadWithMkdirs with tinybrain.de [OK!]
Eternal ID of this version: #1009984/5
Text MD5: 1f0cb0e7ce5f61a17f6d636c403b9dc3
Transpilation MD5: 07bd6996975855bd00e223e044ffefae
Author: stefan
Category: javax
Type: JavaX source code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-11-23 11:33:19
Source code size: 601 bytes / 17 lines
Pitched / IR pitched: No / No
Views / Downloads: 430 / 533
Version history: 4 change(s)
Referenced in: [show references]