private void process(DomainFile file, TaskMonitor monitor)
			throws IOException, CancelledException {

		// Do not follow folder-links or consider program links.  Using content type
		// to filter is best way to control this.  If program links should be considered
		// "Program.class.isAssignableFrom(domainFile.getDomainObjectClass())"
		// should be used.
		if (!ProgramContentHandler.PROGRAM_CONTENT_TYPE.equals(file.getContentType())) {
			// NOTE: linked-folders and linked-files are not currently supported
			return; // skip non-program file
		}

		Program program = null;
		try {
			Msg.debug(IterateRepository.class, "Processing " + file.getPathname() + "...");
			monitor.setMessage("Processing: " + file.getName());
			monitor.incrementProgress(1);
			program = (Program) file.getReadOnlyDomainObject(this, -1, monitor);
			process(program, monitor);
		}
		catch (VersionException e) {
			Msg.error(IterateRepository.class,
				"Failed to process file " + file.getPathname() + ": " + e.getMessage());
		}
		finally {
			if (program != null) {
				program.release(this);
			}
		}
	}
Returns the total number of files under the given folder. This does a recursive 
check to search all subdirs.

@param folder the folder to search
@return total number of files in the folder (and its subfolders)
Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/ingest/IterateRepository.java