private long computeFileSize(File file) {
        if (file.isFile()) {
            return file.length();
        } else if (file.isDirectory()) {
            File subs[] = file.listFiles();
            long s = 0;
            for (int i = 0; i < subs.length; i++) {
                s += computeFileSize(subs[i]);
            }
            return s;
        } else {
            return 0; //links and things are not stored, so they are 0.
        }
    }