def _get_file_tree(self, filenode=None, user=None, cookie=None, version=None):
        filenode = filenode or {
            'path': '/',
            'kind': 'folder',
            'name': self.root_node.name,
        }
        if filenode.get('kind') == 'file':
            return filenode
        elif 'size' in filenode:
            return filenode
        kwargs = {
            'version': version,
            'cookie': cookie,
        }
        filenode['children'] = [
            self._get_file_tree(child, user, cookie=cookie)
            for child in self._get_fileobj_child_metadata(filenode, user, **kwargs)
        ]
        return filenode
Add a user to the directory
dataset/ETHPy150Open CenterForOpenScience/osf.io/website/addons/base/__init__.py/StorageAddonBase._get_file_tree--crossover with--dataset/ETHPy150Open pycontribs/python-crowd/crowd.py/CrowdServer.add_user