protected File establishTemporaryDirectory(String xmldir) throws IOException {
		File dir;
		if (xmldir == null) {
			File tmpDir = Application.getUserTempDirectory();
			if (tmpDir == null) {
				throw new IOException("Could not find temporary directory");
			}
			dir = new File(tmpDir, "bulkinsert_xml");
			deleteTemporaryDirectory(dir);
		}
		else {
			dir = new File(xmldir);
		}
		if (dir.exists() == false) {
			if (dir.mkdir() == false) {
				throw new IOException("Unable to create temp directory: " + dir.getAbsolutePath());
			}
		}
		else if (dir.isDirectory() == false) {
			throw new IOException(dir.getAbsolutePath() + ": is not a directory");
		}
		dir = dir.getCanonicalFile();
		return dir;
	}
Exports information about a binary to a local folder in XML format.

@param resultFolder the folder where the results will be stored
@param query the query object containing the params of the query
@throws IOException if there's an error establishing the database connection
@throws LSHException if there's an error issuing the query
Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/ingest/BulkSignatures.java