@Override
	public void importFiles(DomainFolder destFolder, List<File> files) {

		if (destFolder == null) {
			destFolder = tool.getProject().getProjectData().getRootFolder();
		}

		files = handleSimpleDBUnpack(destFolder, files);
		if (files.isEmpty()) {
			return;
		}

		List<FSRL> fsrls = files.stream().map(f -> fsService().getLocalFSRL(f)).toList();
		BatchImportDialog.showAndImport(tool, null, fsrls, destFolder,
			getTool().getService(ProgramManager.class));
	}
A {@link Plugin} that supplies menu items and tasks to import files into Ghidra.
Ghidra/Features/Base/src/main/java/ghidra/plugin/importer/ImporterPlugin.java