fullPathToRoot method

String fullPathToRoot({
  1. String pathDelimiter = '/',
  2. Iterable<T>? head,
  3. Iterable<T>? tail,
  4. Iterable<String>? headString,
  5. Iterable<String>? tailString,
})

Returns a String that represents a full path to the root step.

Implementation

String fullPathToRoot(
    {String pathDelimiter = '/',
    Iterable<T>? head,
    Iterable<T>? tail,
    Iterable<String>? headString,
    Iterable<String>? tailString}) {
  var pathToRoot =
      valuePathToRootWith(head: head, tail: tail).map((e) => e.toString());
  if (headString != null || tailString != null) {
    pathToRoot = [...?headString, ...pathToRoot, ...?tailString];
  }
  return pathToRoot.join(pathDelimiter);
}