'lists of DirEntries instead of lists of strings'

def scanwalk(self, path, followlinks=False):

    try:
        for entry in scandir(path):
            if (self.terminate and self.terminate.is_set()):
                break
            any_file = ((not self.name) or self.path)
            if ((self.name and self.name.match(entry.name)) or (self.path and self.path.match(entry.path)) or any_file):
                if ((not self.strings) or (not (self.strings and entry.is_file()))):
                    if (not any_file):
                        (yield entry.path)
                else:
                    size = entry.stat().st_size
                    if (size > self.max_size):
                        continue
                    for string in self.search_string(entry.path, min(size, self.max_size)):
                        if string:
                            if self.no_content:
                                (yield entry.path)
                                break
                            else:
                                (yield (entry.path, string))
            if entry.is_dir(follow_symlinks=followlinks):
                for res in self.scanwalk(entry.path):
                    (yield res)
    except Exception as e:
        pass
