private static ExtensionDetails tryToGetExtension(File file) throws IOException {

		if (file == null) {
			log.error("Cannot get an extension; null file");
			return null;
		}

		if (file.isDirectory() && file.canRead()) {
			File propertyFile = new File(file, PROPERTIES_FILE_NAME);
			if (propertyFile.isFile()) {
				return tryToLoadExtensionFromProperties(propertyFile);
			}
		}

		// If the given file is a zip, it's an extension if there's an extension.properties
		// file at the TOP LEVEL ONLY; we don't want to search for nested property files (this
		// would cause us to match things like the main ghidra distribution zip file.
		// eg: DatabaseTools/extension.properties is valid
		//     DatabaseTools/foo/extension.properties is not.
		if (isZip(file)) {
			try (ZipFile zipFile = new ZipFile(file)) {
				Properties props = getProperties(zipFile);
				if (props != null) {
					return createExtensionDetails(props);
				}
				throw new IOException("No extension.properties file found in zip");
			}
		}

		return null;
	}
Returns all archive extensions. These are all the extensions found in
{@link ApplicationLayout#getExtensionArchiveDir}.   This are added to an installation as
part of the build processes.
<p>
Archived extensions may be zip files and directories.

@return set of archive extensions
Ghidra/Framework/Generic/src/main/java/ghidra/util/extensions/ExtensionUtils.java