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

21
LINES

< > BotCompany Repo | #1001052 // programDir

JavaX fragment (include)

static File programDir_mine; // set this to relocate program's data

static File programDir() {
  ret programDir(getProgramID());
}

static File programDir(S snippetID) {
  bool me = sameSnippetID(snippetID, programID());
  if (programDir_mine != null && me)
    ret programDir_mine;
  File dir = new File(javaxDataDir(), formatSnippetIDOpt(snippetID));
  if (me) {
    S c = caseID();
    if (nempty(c)) dir = newFile(dir, c);
  }
  ret dir;
}

static File programDir(S snippetID, S subPath) {
  ret new File(programDir(snippetID), subPath);
}

Author comment

Began life as a copy of #1001043

download  show line numbers  debug dex  old transpilations   

Travelled to 17 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, ishqpsrjomds, jtubtzbbkimh, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, sawdedvomwva, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1001052
Snippet name: programDir
Eternal ID of this version: #1001052/7
Text MD5: ae8d79c9e8888b0c44ca6b41c6927ed3
Author: stefan
Category:
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-01-19 17:14:29
Source code size: 564 bytes / 21 lines
Pitched / IR pitched: No / No
Views / Downloads: 742 / 4353
Version history: 6 change(s)
Referenced in: [show references]