删除文件
删除指定文件路径对应的文件。
接口说明
接口类型
deleteSandboxFile参数
| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
deviceId | string | ✅ | 设备 ID |
file | string | ✅ | 文件绝对路径(filePath) |
返回值
成功返回:
javascript
true基本使用
javascript
const _device = await apiInvoke('getDeviceInfo', {
deviceId: 'P72578581E07'
})
const _result = await apiInvoke('deleteSandboxFile', {
deviceId: 'P72578581E07',
file: `${_device.info.sandboxPath}/hello.txt`
})
console.log(_result)