def grab_files(directory):
    for name in os.listdir(directory):
        full_path = os.path.join(directory, name)
if os.path.isdir(full_path):
    for entry in grab_files(full_path):
        yield entry
elif os.path.isfile(full_path):
    yield full_path
else:
    print('Unidentified name %s. It could be a symbolic link' % full_path)
Как я могу пройти через файловую систему с помощью генератора?