code: def listfile(p):
      
      try:
          for entry in scandir.scandir(p):
              if entry.is_file():
                  yield entry.name
      except OSError:
          return
docs: generator of list files in the path.
      filenames only