public static void deleteFiles(String dir) {
		try {
			File file = new File(dir);
			if (!file.exists()) {
				return;
			}
			if (!file.isDirectory()) {
				return;
			}
			String[] tempList = file.list();
			File temp = null;
			for (int i = 0; i < tempList.length; i++) {
				if (dir.endsWith(File.separator)) {
					temp = new File(dir + tempList[i]);
				} else {
					temp = new File(dir + File.separator + tempList[i]);
				}
				if (temp.isFile()) {
					temp.delete();
				}
			}
		} catch (Exception e) {
			e.printStackTrace();
		}
	}