public static boolean deleteFile(String fileName) {
		// A File object to represent the filename
		if (fileName == null) return false;
		File f = new File(fileName);

		// Make sure the file or directory exists and isn't write protected
		if (!f.exists()) return false;

		if (!f.canWrite()) return false;

		// If it is a directory, make sure it is empty
		if (f.isDirectory()) return false;

		// Attempt to delete it
		boolean success = f.delete();

		return success;
	}