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

16
LINES

< > BotCompany Repo | #1007055 // loadTextFilePossiblyGZipped (function)

JavaX fragment (include)

static S loadTextFilePossiblyGZipped(S fileName) {
  ret loadTextFilePossiblyGZipped(fileName, null);
}
  
static S loadTextFilePossiblyGZipped(S fileName, S defaultContents) {
  File gz = new File(fileName + ".gz");
  ret gz.exists() ? loadGZTextFile(gz) : loadTextFile(fileName, defaultContents);
}

static S loadTextFilePossiblyGZipped(File fileName) {
  ret loadTextFilePossiblyGZipped(fileName, null);
}

static S loadTextFilePossiblyGZipped(File fileName, S defaultContents) {
  ret loadTextFilePossiblyGZipped(fileName.getPath(), defaultContents);
}

Author comment

Began life as a copy of #1001049

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: #1007055
Snippet name: loadTextFilePossiblyGZipped (function)
Eternal ID of this version: #1007055/1
Text MD5: 6443546e837f1e396a0829396089f75e
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-02-27 15:40:56
Source code size: 573 bytes / 16 lines
Pitched / IR pitched: No / No
Views / Downloads: 464 / 472
Referenced in: [show references]