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

7
LINES

< > BotCompany Repo | #1001670 - getFileSize - return file size or 0 if not exists

JavaX fragment (include)

static long getFileSize(S path) {
  ret path == null ? 0 : new File(path).length();
}

static long getFileSize(File f) {
  ret f == null ? 0 : f.length();
}

download  show line numbers  debug dex   

Travelled to 11 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz

No comments. add comment

Snippet ID: #1001670
Snippet name: getFileSize - return file size or 0 if not exists
Eternal ID of this version: #1001670/2
Text MD5: f8b55b1f0cc8e5b8fa761622b7cec1dc
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-03-21 11:23:28
Source code size: 162 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 494 / 594
Version history: 1 change(s)
Referenced in: [show references]

Formerly at http://tinybrain.de/1001670 & http://1001670.tinybrain.de