

def _req_directory(self, cid):
    'Return name and pid of by cid'
    res = self._req_files(cid=cid, offset=0, limit=1, show_dir=1)
    path = res['path']
    count = res['count']
    for d in res:
        if (str(d['cid']) == str(cid)):
            res = {
                'cid': d['cid'],
                'name': d['name'],
                'pid': d['pid'],
                'count': count,
            }
            return res
    else:
        raise RequestFailure('No directory found.')

dataset/ETHPy150Open shichao-an/115wangpan/u115/api.py API._req_directory/VarMisuse@54/78 `path`->`res`