/* JAlbum tool that calculates the size of the album directory */

import se.datadosen.jalbum.*;

// Global variables
long size = 0;

void processDir(File dir) {
	File[] files = dir.listFiles();
	for (File f : files) {
		if (f.isDirectory()) processDir(f);
		else size += f.length();
	}
}

// Execution starts here
processDir(rootOutputDirectory);
JOptionPane.showMessageDialog(window, "Album size: " + size/1024 + " KB", "Calculate album size", JOptionPane.INFORMATION_MESSAGE);
