def METHOD_NAME(cls, root, parent=None, is_last=False, criteria=None):
    root = pathlib.Path(str(root))
    criteria = criteria or cls._default_criteria
    displayable_root = cls(root, parent, is_last)
    yield displayable_root
    children = sorted(list(path
                           for path in root.iterdir()
                           if criteria(path)),
                      key=lambda s: str(s).lower())
    count = 1
    for path in children:
        is_last = count == len(children)
        if path.is_dir():
            yield from cls.METHOD_NAME(path,
                                     parent=displayable_root,
                                     is_last=is_last,
                                     criteria=criteria)
        else:
            yield cls(path, displayable_root, is_last)
        count += 1