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

21
LINES

< > BotCompany Repo | #1011458 // scanLog_iterator - scan log made with logQuoted. TODO: closing if interrupted

JavaX fragment (include)

static IterableIterator<S> scanLog_iterator(S progID, S fileName) {
  ret scanLog_iterator(getProgramFile(progID, fileName));
}

static IterableIterator<S> scanLog_iterator(S fileName) {
  ret scanLog_iterator(getProgramFile(fileName));
}

static IterableIterator<S> scanLog_iterator(File file) {
  // TODO: opens all at once
  final Iterator<S> it = chainIterators(map linesFromFile(
    concatLists(earlierPartsOfLogFile(file), ll(file))));
  ret iteratorFromFunction(func -> S {
    while (it.hasNext()) {
      S s = it.next();
      if (isProperlyQuoted(s))
        ret unquote(s);
    }
    null;
  });
}

Author comment

Began life as a copy of #1001948

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: #1011458
Snippet name: scanLog_iterator - scan log made with logQuoted. TODO: closing if interrupted
Eternal ID of this version: #1011458/6
Text MD5: 704fcab89647e058a20aad8bd2ec9368
Author: stefan
Category:
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-02-03 15:04:01
Source code size: 630 bytes / 21 lines
Pitched / IR pitched: No / No
Views / Downloads: 288 / 325
Version history: 5 change(s)
Referenced in: [show references]