withAncestors property

Iterable<Folder> withAncestors

Return this folder and all its ancestors.

Implementation

Iterable<Folder> get withAncestors sync* {
  var current = this;
  while (true) {
    yield current;
    if (current.isRoot) {
      break;
    }
    current = current.parent2;
  }
}