Skip to content

递归求取目录文件个数

方法名

getFileListCount

用法

用法示例

js
module.getFileListCount({
  dirPath: "/storage/emulated/0/qqmusic",
}, res => {
  console.log(res)
})

参数说明

参数名参数类型是否必填默认值参数描述
dirPathString文件夹绝对路径
child v1.1.0Booleantrue是否递归到子目录

回调

回调示例

json
{
    "data": {
        "count": 739
    },
    "message": "",
    "code": 0
}

回调说明

参数名参数类型参数描述
messageString消息提示
dataObject数据对象
data.countInteger总数量
codeInteger返回类型,0.成功,其他:失败