getDirectory method

String getDirectory(
  1. PackageId id, {
  2. String? relativeFrom,
})

Returns the directory where this package can (or could) be found locally.

If the source is cached, this will be a path in the system cache.

If id is a relative path id, the directory will be relative from relativeFrom. Returns an absolute path if relativeFrom is not passed.

Implementation

String getDirectory(PackageId id, {String? relativeFrom}) {
  return id.source.doGetDirectory(id, this, relativeFrom: relativeFrom);
}