method resolvePath


String resolvePath(String urlPath, [baseUrlOrString])

Source

String resolvePath(String urlPath, [baseUrlOrString]) {
  Uri base;
  if (baseUrlOrString == null) {
    // Dart note: this enforces the same invariant as JS, where you need to
    // call addResolvePathApi first.
    if (_rootUri == null) {
      throw new StateError('call initResolvePath before calling resolvePath');
    }
    base = _rootUri;
  } else if (baseUrlOrString is Uri) {
    base = baseUrlOrString;
  } else {
    base = Uri.parse(baseUrlOrString);
  }
  return base.resolve(urlPath).toString();
}