pathToHosted property

String pathToHosted

Path to the pub cache hosted directory hosted/pub.dartlang.org

Implementation

String get pathToHosted {
  final pubDev = truepath(_pubCachePath, 'hosted', 'pub.dev');
  // 2.19.5/6 changes the path to hosted files in pub-cache.
  // If pub.dev exists then we are running from 2.19.x so use that path.
  if (exists(pubDev)) {
    return pubDev;
  }
  return truepath(_pubCachePath, 'hosted', 'pub.dartlang.org');
}