Stats|Object FileSystemManager.statSync(string path, boolean recursive)

    文件/目录路径 (本地路径)

    是否递归获取目录下的每个文件的 Stats 信息

    recursive 为 false 时

    1. fs.stat({
    2. path: `${wx.env.USER_DATA_PATH}/testDir`,
    3. recursive: true,
    4. Object.keys(res.stats).forEach(path => {
    5. let stats = res.stats[path]
    6. console.log(path, stats.isDirectory())
    7. }