private boolean processFolderNoImport(DomainFolder parentFolder, Pattern filenamePattern)
			throws IOException {

		if (parentFolder.isEmpty()) {
			return false;
		}

		boolean filesProcessed = false;

		for (DomainFile domFile : parentFolder.getFiles()) {
			if (filenamePattern == null || filenamePattern.matcher(domFile.getName()).matches()) {
				// 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())) {
					filesProcessed = true;
					processFileNoImport(domFile);
				}
			}
		}

		if (options.recursive) {
			for (DomainFolder folder : parentFolder.getFolders()) {
				filesProcessed |= processFolderNoImport(folder, filenamePattern);
			}
		}

		return filesProcessed;
	}
Process all files within parentFolder which satisfies the specified filenamePattern.
If filenamePattern is null, all files will be processed
@param parentFolder domain folder to be searched
@param filenamePattern filename pattern or null for all files
@return true if one or more files processed
@throws IOException if an IO problem occurred.
Ghidra/Features/Base/src/main/java/ghidra/app/util/headless/HeadlessAnalyzer.java