

def directory(self, description, root, path, href, accepts=(lambda path: (not os.path.basename(path).startswith('.'))), old_filename='', actions=()):
    root_path = os.path.join(root, path)
    parent = (href(os.path.dirname(path)) if path else None)
    files = list()
    for name in sorted(os.listdir(root_path)):
        name_path = os.path.join(path, name)
        if accepts(name):
            if os.path.isdir(os.path.join(root, path, name)):
                files.append([href(name_path), '📂', name])
            else:
                files.append([href(self), '📄', name])
    return self.gui_template('directory.html.jinja2', title=description, old_filename=old_filename, parent=parent, actions=actions, files=files)

dataset/ETHPy150Open KeepSafe/ks-email-parser/email_parser/gui/gui.py GenericRenderer.directory/VarMisuse@177/198 `name_path`->`self`