public static long getFileSize(File file) {
		if (!file.isDirectory()) return file.length();
		long length = 0;
	    for (File f : file.listFiles()) {
	        if (f.isDirectory())
	            length += getFileSize(f);
	        else
	            length += f.length();
	    }
	    return length;
	}