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

14
LINES

< > TinyBrain | #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;
      if (jmatch("string *=*;", s, m))
        out.put($1, unquoteCtx($2));
    }
  }
  ret out;
}

Author comment

Began life as a copy of #1008849

download  show line numbers  debug dex   

Travelled to 2 computer(s): cfunsshuasjs, tvejysmllsmz

No comments. add comment

Snippet ID: #1008901
Snippet name: ctxLoadGlobals
Eternal ID of this version: #1008901/4
Text MD5: b739ef884ef2f45429561f66e9a7c79c
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-06-16 00:34:54
Source code size: 404 bytes / 14 lines
Pitched / IR pitched: No / No
Views / Downloads: 17 / 19
Version history: 3 change(s)
Referenced in: [show]