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

6
LINES

< > BotCompany Repo | #1029756 // extractResource

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (2553L/16K).

1  
static File extractResource(S name, File outFile) {
2  
  if (!outFile.exists())
3  
    // TODO: use temp file
4  
    stream2file(mc().getResourceAsStream(name), outFile);
5  
  ret outFile;
6  
}

Author comment

Began life as a copy of #1022671

download  show line numbers  debug dex  old transpilations   

Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1029756
Snippet name: extractResource
Eternal ID of this version: #1029756/1
Text MD5: 9da4e4d7b402c629eef87b15066cfbb1
Transpilation MD5: 2d080ca9691f3079eb141ef2e5380272
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-09-11 22:47:15
Source code size: 183 bytes / 6 lines
Pitched / IR pitched: No / No
Views / Downloads: 183 / 253
Referenced in: [show references]