private void calculateFolderSize(FSFolder folder, ObjectContainer<Long> result) {
		for (FSEntry entry : folder.listEntries()) {
			if (entry instanceof FSFile) {
				Long value = result.o;
				value += ((FSFile) entry).getMainFork().getLength();
				result.o = value;
			}
			else if (entry instanceof FSFolder) {
				calculateFolderSize((FSFolder) entry, result);
			}
			else if (entry instanceof FSLink) {
				/* Do nothing. Symbolic link targets aren't part of the folder. */
			}
			else {
				System.err.println("FSEntrySummaryPanel.calculateFolderSize():" +
					" unexpected type " + entry.getClass());
			}
		}
	}
@see org.catacombae.hfsexplorer.gui.FSEntrySummaryPanel
GPL/DMG/src/dmg/java/mobiledevices/dmg/reader/DmgInfoGenerator.java