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

10
LINES

< > BotCompany Repo | #1024339 // boostrapDataFrom - copy all data from another program's (JavaX-Data only) if our data directory is empty

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (1929L/13K).

// true if it bootstrapped
sbool bootstrapDataFrom(S progID) {
  File otherDir = javaxDataDir(progID);
  File myDir = programDir();
  if (sameFile(otherDir, myDir)) false;
  if (!directoryIsEmpty(myDir)) false;
  print("Importing data from: " + progID + " to " + programID());
  copyAllFilesInDirectory_rec_noOverwrite(otherDir, myDir);
  true;
}

download  show line numbers  debug dex  old transpilations   

Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1024339
Snippet name: boostrapDataFrom - copy all data from another program's (JavaX-Data only) if our data directory is empty
Eternal ID of this version: #1024339/5
Text MD5: 9ea7fe27e6cf6156be2d7a3bc23ab048
Transpilation MD5: 673687fab1a1191b8aaea10fcbd2ab80
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-08-04 13:57:56
Source code size: 355 bytes / 10 lines
Pitched / IR pitched: No / No
Views / Downloads: 202 / 260
Version history: 4 change(s)
Referenced in: [show references]