code: def scandir (self):
          
          if hasattr (os, 'scandir'):
              scandir = os.scandir
          else:
              from scandir import scandir
  
          return scandir (path_type (self))
docs: Iteratively scan this path, assuming it’s a directory. This requires and
          uses the :mod:`scandir` module.
  
          `scandir` is different than `iterdir` because it generates `DirEntry`
          items rather than Path instances. DirEntry objects have their
          properties filled from the directory info itself, so querying them
          avoids syscalls that would be necessary with iterdir().
  
          The generated values are :class:`scandir.DirEntry` objects which have
          some information pre-filled. These objects have methods ``inode()``,
          ``is_dir()``, ``is_file()``, ``is_symlink()``, and ``stat()``. They
          have attributes ``name`` (the basename of the entry) and ``path`` (its
          full path).