7.app_save_info
创建删除Blockly文件夹或文件时调用
Message:
json
{
"cmd": "app_save_info",
"data": {
"userId": "test",
"config": {
"lastAccessTime": 1688725164.49637,
"deviceType": "lite6",
"name": "myapp",
"expendKeys": [
"/[D]USER_APPS",
"/[D]/sample",
"/[D]test001"
],
"selectFilePath": "/uu12"
},
"children":[
{
"type": "dir",
"uuid": "/[D]USER_APPS",
"children": [
{
"type": "file",
"name": "uu12",
"children": [],
"uuid": "/uu12"
}
],
"name": "USER_APPS"
},
{
"type": "dir",
"name": "sample",
"children": [],
"uuid": "/[D]/sample"
},
{
"type": "dir",
"name": "test001",
"children": [],
"uuid": "/[D]test001"
}
]
},
"id": "1"
}
Request:
- cmd
- string,必填,请求接口
- date
- Application/json,必填,请求数据
- id
- string,必填,请求序列号
data | 数据类型 | 必须 | 描述 | 示例值 |
userId | string | 否 | blockly项目用户类别,默认为’test‘ | "test" |
version | string | 否 | Lite6机械臂传’lite6’,非lite6手臂不传该参数 | "lite6" |
config | json | 否 | blockly文件目录信息 | {'selectFilePath':'/4545','expendKeys':['/[D]5125'], 'lastAccessTime': 1677486596.026057,'deviceType': 'xarm6','name':'myapp'} (selectFilePath记录当前选中的文件或文件夹名称; expendKeys为当前展开的所有文件夹列表,示例中为‘5125’只有该文件夹展开,/[D]为文件夹标识必须带上,如果没有展开的文件夹填[]; lastAccessTime请求接口的时间; deviceType机械臂类型,Lite6手臂填‘lite6’; name默认‘myapp’) |
children | json | 否 | blockly创建后删除存在的所有文件 | {'type': 'dir', 'name': '12312', 'children': [{'type': 'file', 'name': '342445', 'children': [], 'uuid': '/342445'}], 'uuid': '/[D]12312'}] (name为文件夹名称,children为文件夹下的所有文件信息,type为文件夹或文件类型) |
Response:
code=0->成功;
code!=0->失败,-为-32是写文件内容时错误
请求参数
无