Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public long getFolderSize(File file, long size) {
- if (file.isDirectory()) {
- for (File child : file.listFiles()) {
- size += child.length();
- getFolderSize(child, size);
- }
- }
- return size;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement