package_config library

A package configuration is a way to assign file paths to package URIs, and vice-versa.

This package provides functionality to find, read and write package configurations in the specified format.

Classes

InvalidLanguageVersion
An invalid language version.
LanguageVersion
A language version.
Package
Configuration data for a single package.
PackageConfig
A package configuration.
PackageConfigError
General superclass of most errors and exceptions thrown by this package.

Functions

findPackageConfig(Directory directory, {bool recurse = true, void onError(Object error)?, int minVersion = 1}) Future<PackageConfig?>
Finds a package configuration relative to directory.
findPackageConfigUri(Uri location, {bool recurse = true, int minVersion = 1, Future<Uint8List?> loader(Uri uri)?, void onError(Object error)?}) Future<PackageConfig?>
Finds a package configuration relative to location.
loadPackageConfig(File file, {bool preferNewest = true, void onError(Object error)?}) Future<PackageConfig>
Reads a specific package configuration file.
loadPackageConfigUri(Uri file, {Future<Uint8List?> loader(Uri uri)?, bool preferNewest = true, void onError(Object error)?}) Future<PackageConfig>
Reads a specific package configuration URI.
savePackageConfig(PackageConfig configuration, Directory directory) Future<void>
Writes a package configuration to the provided directory.