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

16
LINES

< > BotCompany Repo | #1008901 // ctxLoadGlobals

JavaX fragment (include)

static SS ctxLoadGlobals(S botID) {
  SS out = new TreeMap;
  File f = loadLibrary(botID);
  L<S> names = endingWithIC("/di.globals", listFilesInZip(f));
  for (S name : names) {
    L<S> lines = toLinesFullTrim(loadTextFileFromZip(f, name));
    for i, S s over lines: {
      new Matches m;
      L<S> tok = javaTok(s);
      int idx = jfind(tok, "*=*;");
      if (idx >= 0)
        out.put(tok.get(idx), unquoteCtx(tok.get(idx+4)));
    }
  }
  ret out;
}

Author comment

Began life as a copy of #1008849

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: #1008901
Snippet name: ctxLoadGlobals
Eternal ID of this version: #1008901/8
Text MD5: 7cc6598f3e49276ba94a956880366bab
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-07-04 19:44:55
Source code size: 474 bytes / 16 lines
Pitched / IR pitched: No / No
Views / Downloads: 494 / 554
Version history: 7 change(s)
Referenced in: [show references]