public boolean clearDir(File dir) {
		File[] contents = dir.listFiles();
		if (contents != null) {
			for (File file : contents) {
				if (file.isDirectory()) {
					clearDir(file);
				}
				file.delete();
			}
		}
		return dir.delete();
	}