# FileSystemManager.mkdir

创建本地目录。

# 支持说明

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

# 输入

继承标准对象输入,扩展属性:

名称 数据类型 必填 默认值 描述
dirPath string 创建的目录路径, 必须 bzfile://user 开头
recursive boolean false 是否递归创建该目录的上级目录后再创建该目录。

# 输出

继承标准对象输出,无扩展属性

# 代码示例

const fileSystemManager = bz.getFileSystemManager();

fileSystemManager.mkdir({
  dirPath: "bzfile://user/example-dir",
  recursive: false,
  success(_res) {
    console.log("bzfile://user/example-dir 创建成功");
  },
  fail(res) {
    console.log("bzfile://user/example-dir 创建失败", res.errMsg);
  },
});
1
2
3
4
5
6
7
8
9
10
11
12
最后更新于 : 5/18/2023, 3:09:13 PM