void mergeBasePath(String base, [ bool force = false ])

Merges the base path with this path.

Source

void mergeBasePath(String base, [bool force = false]) {
  if (base == null) {
    return;
  }

  if (!isAbsolute) {
    if (parentPath == '') {
      parentPath = base;
    } else {
      parentPath = '$base/$parentPath';
    }
    path = '$parentPath/$name';
  } else if (force) {
    // apply base path on a absolute path
    if (name == '') {
      // map the root path
      path = base;
      _parse();
    } else {
      parentPath = '$base$parentPath';
      path = '$parentPath/$name';
    }
  }
}