PackageManager.load

Loads a Package from the filesystem

This is called when a Package needs to be loaded from the path. This does not change the internal state of the PackageManager, it simply loads the Package and returns it - it is up to the caller to call addPackages.

class PackageManager
protected
load
(
NativePath path
,
NativePath recipe = NativePath.init
,
Package parent = null
,
string version_ = null
,
StrictMode mode = StrictMode.Ignore
)

Parameters

path NativePath

The directory in which the package resides.

recipe NativePath

Optional path to the package recipe file. If left empty, the path directory will be searched for a recipe file.

parent Package

Reference to the parent package, if the new package is a sub package.

version_ string

Optional version to associate to the package instead of the one declared in the package recipe, or the one determined by invoking the VCS (GIT currently).

mode StrictMode

Whether to issue errors, warning, or ignore unknown keys in dub.json

Return Value

Type: Package

A populated Package.

Throws

If no package can be found at the path / with the recipe.

Meta