FileSystemManager.rmdirSync

版本要求:
BaseKit≥2.4.3
支持平台:
iOSAndroid

方法签名
FileSystemManager.rmdirSync(params?: )

描述

删除目录,需要文件读写权限

参数

参数类型必填说明
否参数对象

返回值

无

示例代码

import { getFileSystemManager } from '@ray-js/ray'

// 删目录前先建一个,保证有目录可删。
const fm = await getFileSystemManager();

fm.mkdir({
  dirPath: "thingfile://usr/ttt_demo_dir",
  recursive: true,
  success: () => {
    fm.rmdir({
      dirPath: "thingfile://usr/ttt_demo_dir",
      recursive: true,
      success: data => {
        console.log(data);
      },
      fail: error => {
        console.error(error);
      },
    });
  },
  fail: error => {
    console.error(error);
  },
});