private FileArchive openFileArchive(String archiveName, UniversalID archiveID,
			boolean acquireWriteLock) {

		if (archiveName.endsWith(FileDataTypeManager.SUFFIX)) {
			archiveName = archiveName.substring(0,
				archiveName.length() - FileDataTypeManager.SUFFIX.length());
		}

		String archiveFileName = archiveName + FileDataTypeManager.SUFFIX;

		List<Archive> allArchives = getAllArchives();
		for (Archive archive : allArchives) {
			if (archive instanceof FileArchive) {
				if (archive.getName().equals(archiveName)) {
					if (archiveID == null ||
						archiveID.equals(archive.getDataTypeManager().getUniversalID())) {
						if (acquireWriteLock && !archive.isModifiable()) {
							// Close archive - hopefully it will get reopened below
							closeArchive(archive);
						}
						break;
					}
				}
			}
		}

		Path[] pathsFromPreferences = getArchivePaths();
		for (Path path : pathsFromPreferences) {
			if (!path.isEnabled() || !isAllowedArchivePath(path.getPathAsString())) {
				continue;
			}
			ResourceFile archiveFile = new ResourceFile(path.getPath(), archiveFileName);
			if (archiveFile.exists()) {
				FileArchive archive = openFileArchive(archiveFile, archiveID, acquireWriteLock);
				if (archive != null) {
					return archive;
				}
			}
		}

		// Look for archive provided with installation (read-only)
		ResourceFile archiveFile = DataTypeArchiveUtility.findArchiveFile(archiveFileName);
		if (archiveFile == null) {
			Msg.showError(this, plugin.getProvider().getComponent(), "Open Archive Failed",
				"Archive file not found: " + archiveFileName);
			return null;
		}
		return openFileArchive(archiveFile, archiveID, false);
	}
@return all archive search paths (both enabled and disabled are included)
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/datamgr/archive/DataTypeManagerHandler.java