def list_dir(cookie, tokens, path, page=<NUM_LIT:1>, num=<NUM_LIT:100>):
timestamp = util.timestamp()<EOL>url = '<STR_LIT>'.join([<EOL>const.PAN_API_URL,<EOL>'<STR_LIT>',<EOL>'<STR_LIT>', str(num),<EOL>'<STR_LIT>', timestamp,<EOL>'<STR_LIT>', str(page),<EOL>'<STR_LIT>', encoder.encode_uri_component(path),<EOL>'<STR_LIT>', util.latency(),<EOL>'<STR_LIT>',<EOL>'<STR_LIT>', timestamp,<EOL>'<STR_LIT>', tokens['<STR_LIT>'],<EOL>])<EOL>req = net.urlopen(url, headers={<EOL>'<STR_LIT>': const.CONTENT_FORM_UTF8,<EOL>'<STR_LIT>': cookie.sub_output('<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>'),<EOL>})<EOL>if req:<EOL><INDENT>content = req.data<EOL>return json.loads(content.decode())<EOL><DEDENT>else:<EOL><INDENT>return None<EOL><DEDENT>
得到一个目录中的所有文件的信息(最多100条记录).