ancestors method

Iterable<Path> ancestors()

Implementation

Iterable<Path> ancestors() sync* {
  yield this;
  Path? current = parent().toNullable();
  while (current != null) {
    yield current;
    current = current.parent().toNullable();
  }
}