getFileListAll method
递归获取文件列表
/// 其他请求参数查看官方文档: https://pan.baidu.com/union/doc/Zksg0sb73 ,并放入otherParams
Implementation
Future<FileAllList> getFileListAll({
required String dir,
int? start,
int? end,
BaiduOrder order = BaiduOrder.name,
bool desc = false,
int limit = 1000,
bool recursion = false,
bool web = true,
Map<String, String> otherParams = const {},
}) async {
final params = <String, String>{
'path': dir,
'limit': limit.toString(),
...otherParams,
};
if (recursion) {
params['recursion'] = '1';
}
_addCommonParams(
params: params,
order: order,
desc: desc,
start: start,
end: end,
limit: limit,
web: web,
);
final map = await _get('rest/2.0/xpan/multimedia', params: {
'method': 'listall',
...params,
});
return FileAllList.fromJson(map);
}