docs: def list_files(
          client, fileshare, prefix, recursive, timeout=None, snapshot=None):
      # type: (azure.storage.file.FileService, str, str, bool, int, str) ->
      #        azure.storage.file.models.File
      """List files in path
      :param azure.storage.file.FileService client: file client
      :param str fileshare: file share
      :param str prefix: path prefix
      :param bool recursive: recursive
      :param int timeout: timeout
      :param str snapshot: snapshot
      :rtype: azure.storage.file.models.File
      :return: generator of files
      """
      # if single file, then yield file and return
      _check = check_if_single_file(client, fileshare, prefix, timeout)
      if _check[0]:
          yield _check[1]
          return
      # get snapshot from fileshare
      if snapshot is None:
          fileshare, snapshot = \
              blobxfer.util.parse_fileshare_or_file_snapshot_parameter(fileshare)
          # get snapshot from prefix
          if snapshot is None:
              prefix, snapshot = \
                  blobxfer.util.parse_fileshare_or_file_snapshot_parameter(
                      prefix)
      # else recursively list from prefix path
      dirs = [prefix]
      while len(dirs) > 0:
          dir = dirs.pop()
          files = client.list_directories_and_files(
              share_name=fileshare,
              directory_name=dir,
              timeout=timeout,
              snapshot=snapshot,
          )
          for file in files:
              fspath = str(
                  pathlib.Path(dir if dir is not None else '') / file.name)
              if type(file) == azure.storage.file.models.File:
                  fsprop = client.get_file_properties(
                      share_name=fileshare,
                      directory_name=None,
                      file_name=fspath,
                      timeout=timeout,
                      snapshot=snapshot,
                  )
                  yield fsprop
              else:
                  if recursive:
                      dirs.append(fspath)