createPath method

String createPath([
  1. Iterable? segments
])

Create a path with the given segments.

Implementation

String createPath([Iterable? segments]) {
  if (segments == null || segments.isEmpty) {
    return this;
  }

  Iterable<String> list = segments.map((dynamic e) => '/$e');
  return this + list.join();
}