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

10
LINES

< > BotCompany Repo | #1031476 // fileExistsInInDirOrZip

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

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

1  
// subPath is relative and with slashes
2  
sbool fileExistsInInDirOrZip(File location, S subPath) ctex {
3  
  if (location.isDirectory()) {
4  
    File f = new File(location, subPath);
5  
    ret f.exists();
6  
  } else if (location.isFile()) {
7  
    ret zipContainsFile(location, subPath);
8  
  }
9  
  false;
10  
}

Author comment

Began life as a copy of #1031474

download  show line numbers  debug dex  old transpilations   

Travelled to 4 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt

No comments. add comment

Snippet ID: #1031476
Snippet name: fileExistsInInDirOrZip
Eternal ID of this version: #1031476/3
Text MD5: ca13b5673d3547e0b36083974047e6da
Transpilation MD5: 564f78d78172d4b1f41a8f7a2ac1d8ab
Author: stefan
Category: javax / io
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-06-14 05:53:48
Source code size: 297 bytes / 10 lines
Pitched / IR pitched: No / No
Views / Downloads: 176 / 254
Version history: 2 change(s)
Referenced in: [show references]