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

14
LINES

< > BotCompany Repo | #740 // Upload a local (text) file as NT snippet

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

Libraryless. Click here for Pure Java version (367L/4K/12K).

!636
!standard functions

main {
  psvm {
    String name = args[0]; // put file name here
    name = new File(name).getAbsolutePath();
    String text = loadTextFile(name, null);
    if (text == null)
      System.out.println("File not found: " + name);
    else
      ntUpload("textfile-loader", "Contents of " + name + " on " + computerID(), text);
  }
}

Author comment

Began life as a copy of #1000452

download  show line numbers  debug dex  old transpilations   

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

Comments [hide]

ID Author/Program Comment Date
1015 #1000604 (pitcher) 2015-08-20 15:28:24
1014 #1000610 (pitcher) 2015-08-20 15:16:23

add comment

Snippet ID: #740
Snippet name: Upload a local (text) file as NT snippet
Eternal ID of this version: #740/1
Text MD5: b76fe77527ccb1567775232aa0934fe4
Transpilation MD5: ed1b99523a40d54d0f6f215b22a43b1b
Author: stefan
Category:
Type: JavaX source code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2015-08-20 15:16:23
Source code size: 370 bytes / 14 lines
Pitched / IR pitched: No / Yes
Views / Downloads: 663 / 730
Referenced in: [show references]