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 string

Package name to search for

vers Version

Exact version to search for

Return Value

Type: Package

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

Meta