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 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: | #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: | 1391 / 1608 |
| Version history: | 1 change(s) |
| Referenced in: | #1002427 - Accellerating 629 (SPIKE) #1006654 - Standard functions list 2 (LIVE, continuation of #761) #1007388 - fileLength - synonym of getFileSize - return file size or 0 if not exists #1020820 - fileSizeOrMinus1 - return file size or -1 if not exists #3000382 - Answer for ferdie (>> t = 1, f = 0) |