PackageManager.getBestPackage

Searches for the latest version of a package matching the version range.

This will search the local file system only (it doesn't connect to the registry) for the "best" (highest version) that matches range. An overload with a single version exists to search for an exact version.

Parameters

name PackageName

Package name to search for

range VersionRange

Range of versions to search for, defaults to any

Return Value

Type: Package

The best package matching the parameters, or null if none was found.

Meta