code: def ancestors(self, stop=None):
          
          folder = self
          while folder.parent != stop:
              if folder.parent == folder:
                  return
              yield folder.parent
              folder = folder.parent
docs: Generates the parents until stop or the absolute
          root directory is reached.