Location

A managed location, with packages, configuration, and overrides

There exists three standards locations, listed in PlacementLocation. The user one is the default, with the system and local one meeting different needs.

Each location has a root, under which the following may be found: - A packages/ directory, where packages are stored (see packagePath); - A local-packages.json file, with extra search paths and manually added packages (see dub add-local); - A local-overrides.json file, with manually added overrides (dub add-override);

Additionally, each location host a config file, which is not managed by this module, but by dub itself.

Constructors

this
this(NativePath path)
Undocumented in source.

Members

Functions

getPackagePath
NativePath getPackagePath(PackageName name, string vers)

Get the final destination a specific package needs to be stored in.

isManaged
bool isManaged(NativePath path)

Determines if a specific path is within a DUB managed Location.

load
Package load(PackageName name, Version vers, PackageManager mgr)

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

loadOverrides
void loadOverrides(PackageManager mgr)
Undocumented in source. Be warned that the author may not have intended to support it.
lookup
inout(Package) lookup(PackageName name, Version ver)

Looks up already-loaded packages at a specific version

scan
void scan(PackageManager mgr, bool refresh)

Scan this location

scanLocalPackages
void scanLocalPackages(bool refresh, PackageManager manager)
Undocumented in source. Be warned that the author may not have intended to support it.
scanPackageFolder
void scanPackageFolder(NativePath path, PackageManager mgr, Package[] existing_packages)

Scan the content of a folder (packagePath or in searchPaths), and add all packages that were found to this location.

Variables

fromPath
Package[] fromPath;

List of packages stored under packagePath and automatically detected

localPackages
Package[] localPackages;

List of manually registered packages at this Location and stored in local-packages.json

overrides
PackageOverride_[] overrides;

List of overrides stored at this Location

packagePath
NativePath packagePath;

The absolute path to the root of the location

searchPath
NativePath[] searchPath;

Configured (extra) search paths for this Location

Meta