# Stats.isDirectory

判断当前文件是否一个目录。

# 支持说明

应用能力 Android iOS PC 预览效果
小程序 3.12.0 3.11.0 3.10.0
扫码预览
用BoosHi扫码或PC端点击
网页应用 待开发 待开发 待开发 待补充

# 输入

# 输出

返回值:boolean

# 示例代码

const fileSystemManager = bz.getFileSystemManager();
fileSystemManager.stat({
    path: "bzfile://temp",
    success(res) {
      console.log(res.stat.isDirectory());
    },
    fail(res) {
      console.log(`stat fail: ${JSON.stringify(res)}`);
    }
});
1
2
3
4
5
6
7
8
9
10

返回值示例:

true
1
最后更新于 : 5/18/2023, 3:09:13 PM