withAncestors property

Iterable<Folder> get 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.parent;
  }
}