code: def scantree(path):
      # type: (str) -> os.DirEntry
      
      for entry in scandir(path):
          if entry.is_dir(follow_symlinks=True):
              # due to python2 compat, cannot use yield from here
              for t in scantree(entry.path):
                  yield t
          else:
              yield entry
docs: Recursively scan a directory tree
      :param str path: path to scan
      :rtype: DirEntry
      :return: DirEntry via generator