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

16
LINES

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

JavaX fragment (include)

1  
static S loadTextFilePossiblyGZipped(S fileName) {
2  
  ret loadTextFilePossiblyGZipped(fileName, null);
3  
}
4  
  
5  
static S loadTextFilePossiblyGZipped(S fileName, S defaultContents) {
6  
  File gz = new File(fileName + ".gz");
7  
  ret gz.exists() ? loadGZTextFile(gz) : loadTextFile(fileName, defaultContents);
8  
}
9  
10  
static S loadTextFilePossiblyGZipped(File fileName) {
11  
  ret loadTextFilePossiblyGZipped(fileName, null);
12  
}
13  
14  
static S loadTextFilePossiblyGZipped(File fileName, S defaultContents) {
15  
  ret loadTextFilePossiblyGZipped(fileName.getPath(), defaultContents);
16  
}

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: 468 / 476
Referenced in: [show references]