@Nullable
	default DirectoryPathNode findPackage(@Nonnull String name) {
		// Map '.' to '/' in case users pass in the common dot format instead.
		name = name.replace('.', '/');

		// Modify input such that the package name we compare against ends with '/'.
		// This prevents confusing matches like "com/example/a" from matching against contents in "com/example/abc".
		String cmp;
		if (name.endsWith("/")) {
			cmp = name;
			name = name.substring(0, name.length() - 1);
		} else {
			cmp = name + "/";
		}

		// We *may* want to allow specifying 'internal=true' some time later, but for now I haven't had
		// a particular use case for that.
		Queue<WorkspaceResource> resourceQueue = new ArrayDeque<>(getAllResources(false));
		while (!resourceQueue.isEmpty()) {
			WorkspaceResource resource = resourceQueue.remove();

			// Check all class bundles for entries that contain the package name.
			for (ClassBundle<? extends ClassInfo> bundle : resource.classBundleStream().toList()) {
				for (String key : bundle.keySet()) {
					if (key.startsWith(cmp))
						return PathNodes.directoryPath(this, resource, bundle, name);
				}
			}

			// Queue up embedded resources.
			resourceQueue.addAll(resource.getEmbeddedResources().values());
		}
		return null;
	}
@param name
		Package name.

@return Path to <i>the first</i> package matching the given name.
recaf-core/src/main/java/software/coley/recaf/workspace/model/Workspace.java