static Tree<FileWithSize> findDirsWithSizes_tree(File dir) { long clusterSize = assumedClusterSize(); long n = 0; new L<Tree<FileWithSize>> l2; for (File f : listFiles(dir)) if (f.isDirectory()) l2.add(findDirsWithSizes_tree(f)); else n += roundUpTo(clusterSize, f.length()); for (Tree<FileWithSize> f : l2) n += f.a.size; ret Tree(FileWithSize(dir, n), l2); }
Began life as a copy of #1019094
download show line numbers debug dex old transpilations
Travelled to 12 computer(s): bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1019096 |
Snippet name: | findDirsWithSizes_tree (recurses) |
Eternal ID of this version: | #1019096/1 |
Text MD5: | f04890263ab25218f86298538c059a67 |
Author: | stefan |
Category: | javax / io |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-10-23 16:58:34 |
Source code size: | 403 bytes / 12 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 344 / 387 |
Referenced in: | [show references] |