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

7
LINES

< > BotCompany Repo | #1020820 // fileSizeOrMinus1 - return file size or -1 if not exists

JavaX fragment (include)

static long fileSizeOrMinus1(S path) {
  ret path == null ? -1 : fileSizeOrMinus1(newFile(path));
}

static long fileSizeOrMinus1(File f) {
  ret f == null || !isFile(f) ? -1 : f.length();
}

Author comment

Began life as a copy of #1001670

download  show line numbers  debug dex  old transpilations   

Travelled to 9 computer(s): bhatertpkbcr, cfunsshuasjs, jozkyjcghlvl, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, whxojlpjdney

No comments. add comment

Snippet ID: #1020820
Snippet name: fileSizeOrMinus1 - return file size or -1 if not exists
Eternal ID of this version: #1020820/1
Text MD5: 37fd01d4065f1ce5750de44ce71a6278
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-01-03 19:13:19
Source code size: 196 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 207 / 256
Referenced in: [show references]