private void processFileNoImport(DomainFile domFile) throws IOException {

		if (domFile.isHijacked()) {
			Msg.error(this,
				"Skipped processing for " + domFile.getPathname() + " -- file is hijacked");
			return;
		}

		// Do not follow folder-links or consider program links.  Using content type
		// to filter is best way to control this.
		if (!ProgramContentHandler.PROGRAM_CONTENT_TYPE.equals(domFile.getContentType())) {
			return; // skip non-Program files
		}

		Program program = null;
		boolean keepFile = true; // if false file should be deleted after release
		boolean terminateCheckoutWhenDone = false;

		boolean readOnlyFile =
			options.readOnly || domFile.isReadOnly() || !domFile.isInWritableProject();

		try {
			// Exclusive checkout required when commit option specified
			if (!readOnlyFile && domFile.isVersioned()) {
				if (!domFile.isCheckedOut()) {
					if (!domFile.canCheckout()) {
						Msg.warn(this, "Skipped processing for " + domFile.getPathname() +
							" within read-only repository");
						return;
					}
					if (!domFile.checkout(options.commit, TaskMonitor.DUMMY)) {
						Msg.warn(this, "Skipped processing for " + domFile.getPathname() +
							" -- failed to get exclusive file checkout required for commit");
						return;
					}
					// Only terminate checkout when done if we did the checkout
					terminateCheckoutWhenDone = true;
				}
				else if (options.commit && !domFile.isCheckedOutExclusive()) {
					Msg.error(this, "Skipped processing for " + domFile.getPathname() +
						" -- file is checked-out non-exclusive (commit requires exclusive checkout)");
					return;
				}
			}

			program = (Program) domFile.getDomainObject(this, true, false, TaskMonitor.DUMMY);

			String readOnlyText = readOnlyFile ? "read-only " : "";
			Msg.info(this,
				"REPORT: Processing " + readOnlyText + "project file: " + domFile.getPathname());

			// This method already takes into account whether the user has set the "noanalysis"
			// flag or not
			keepFile = analyzeProgram(domFile.getPathname(), program) || readOnlyFile;

			if (!keepFile) {
				program.setTemporary(true); // don't save changes
				if (!options.okToDelete) {
					// Don't remove file unless okToDelete was specified
					Msg.warn(this, "Due to script activity, " + domFile.getPathname() +
						" deletion was requested but denied -- 'okToDelete' parameter was not specified");
					keepFile = true;
				}
			}

			if (readOnlyFile) {
				if (program.isChanged()) {
					Msg.info(this, "REPORT: Discarding changes to the following read-only file: " +
						domFile.getPathname());
				}
				return;
			}

			if (program.isTemporary()) {
				if (program.isChanged()) {
					Msg.info(this,
						"REPORT: Discarding changes to the following file as a result of script activity: " +
							domFile.getPathname());
				}
				return;
			}

			if (domFile.canSave()) {
				domFile.save(TaskMonitor.DUMMY);
				Msg.info(this,
					"REPORT: Save succeeded for processed file: " + domFile.getPathname());
			}
			if (program.isChanged()) {
				Msg.error(this,
					"REPORT: Error trying to save changes to file: " + domFile.getPathname());
			}

			if (options.commit) {

				AutoAnalysisManager.getAnalysisManager(program).dispose();
				program.release(this);
				program = null;

				// Only commit if it's a shared project.
				commitProgram(domFile);
			}
		}
		catch (VersionException e) {

			if (e.isUpgradable()) {
				Msg.error(this,
					domFile.getPathname() +
						": this file was created with an older version of Ghidra.  Automatic " +
						"upgrading of the file to the current version is possible, but " +
						"requires an exclusive check-out of the file.  Please check out the file " +
						" using the Ghidra GUI and then re-run Headless.");
			}
			else {
				Msg.error(this, domFile.getPathname() +
					": this file was created with a newer version of Ghidra, and can not be processed.");
			}
		}
		catch (CancelledException e) {
			// This can never happen because there is no user interaction in headless!
		}
		catch (Exception exc) {
			Msg.error(this, domFile.getPathname() + " Error during analysis: " + exc.getMessage(),
				exc);
		}
		finally {

			if (program != null) {
				AutoAnalysisManager.getAnalysisManager(program).dispose();
				program.release(this);
				program = null;
			}

			if (!readOnlyFile) { // can't change anything if read-only file

				// Undo checkout of it is still checked-out and either the file is to be
				// deleted, or we just checked it out and file changes have been committed
				if (domFile.isCheckedOut()) {
					if (!keepFile ||
						(terminateCheckoutWhenDone && !domFile.modifiedSinceCheckout())) {
						domFile.undoCheckout(false);
					}
				}

				if (!keepFile) {
					deleteDomainFile(domFile);
				}
			}
		}
	}
{@literal Run prescripts -> analysis -> postscripts (any of these steps is optional).}
@param fileAbsolutePath Path of the file to analyze.
@param program The program to analyze.
@return true if the program file should be kept.  If analysis or scripts have marked
			the program as temporary changes should not be saved.  Returns false in
			these cases:
		- One of the scripts sets the Headless Continuation Option to "ABORT_AND_DELETE" or
			"CONTINUE_THEN_DELETE".
Ghidra/Features/Base/src/main/java/ghidra/app/util/headless/HeadlessAnalyzer.java