PackageManager.lookup

Looks up a package, first in the list of loaded packages, then directly on the file system.

This function allows for lazy loading of packages, without needing to first scan all the available locations (as refresh does).

Note: This function does not take overrides into account. Overrides need to be resolved by the caller before lookup is called. Additionally, if a package of the same version is loaded in multiple locations, the first one matching (local > user > system) will be returned.

class PackageManager
protected
lookup

Parameters

name PackageName

The full name of the package to look up

vers Version

The version the package must match

Return Value

Type: Package

A Package if one was found, null if none exists.

Meta