PackageManager

The PackageManager can retrieve present packages and get / remove packages.

class PackageManager {}

Constructors

this
this(Path user_path, Path system_path, bool refresh_packages)
Undocumented in source.

Members

Aliases

Hash
alias Hash = ubyte[]
Undocumented in source.

Functions

addLocalPackage
Package addLocalPackage(Path path, string verName, LocalPackageType type)
Undocumented in source. Be warned that the author may not have intended to support it.
addOverride
void addOverride(LocalPackageType scope_, string package_, Dependency version_spec, Version target)
void addOverride(LocalPackageType scope_, string package_, Dependency version_spec, Path target)

Adds a new override for the given package.

addSearchPath
void addSearchPath(Path path, LocalPackageType type)

For the given type add another path where packages will be looked up.

getBestPackage
Package getBestPackage(string name, Dependency version_spec, bool enable_overrides)
Package getBestPackage(string name, string version_spec)

Searches for the latest version of a package matching the given dependency.

getFirstPackage
Package getFirstPackage(string name)

Looks up the first package matching the given name.

getOrLoadPackage
Package getOrLoadPackage(Path path, PathAndFormat infoFile)
Undocumented in source. Be warned that the author may not have intended to support it.
getOverrides
const(PackageOverride)[] getOverrides(LocalPackageType scope_)

Returns a list of all package overrides for the given scope.

getPackage
Package getPackage(string name, Version ver, bool enable_overrides)
Package getPackage(string name, string ver, bool enable_overrides)
Package getPackage(string name, Version ver, Path path)
Package getPackage(string name, string ver, Path path)
Package getPackage(string name, Path path)

Looks up a specific package.

getPackageIterator
int delegate(int delegate(ref Package)) getPackageIterator()
Undocumented in source. Be warned that the author may not have intended to support it.
getPackageIterator
int delegate(int delegate(ref Package)) getPackageIterator(string name)
Undocumented in source. Be warned that the author may not have intended to support it.
getSubPackage
Package getSubPackage(Package base_package, string sub_name, bool silent_fail)
Undocumented in source. Be warned that the author may not have intended to support it.
hashPackage
Hash hashPackage(Package pack)

Generates a hash value for a given package. Some files or folders are ignored during the generation (like .dub and .svn folders)

isManagedPackage
bool isManagedPackage(Package pack)

Determines if a package is managed by DUB.

refresh
void refresh(bool refresh_existing_packages)
Undocumented in source. Be warned that the author may not have intended to support it.
remove
void remove(Package pack, bool force_remove)

Removes the given the package.

removeLocalPackage
void removeLocalPackage(Path path, LocalPackageType type)
Undocumented in source. Be warned that the author may not have intended to support it.
removeOverride
void removeOverride(LocalPackageType scope_, string package_, Dependency version_spec)

Removes an existing package override.

removeSearchPath
void removeSearchPath(Path path, LocalPackageType type)

Removes a search path from the given type.

storeFetchedPackage
Package storeFetchedPackage(Path zip_file_path, Json package_info, Path destination)

Extracts the package supplied as a path to it's zip file to the destination and sets a version field in the package description.

Properties

completeSearchPath
const(Path)[] completeSearchPath [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
disableDefaultSearchPaths
bool disableDefaultSearchPaths [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
searchPath
Path[] searchPath [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
searchPath
const(Path)[] searchPath [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.

Meta