252 lines
5.7 KiB
Markdown
252 lines
5.7 KiB
Markdown
|
|
# Disk
|
||
|
|
|
||
|
|
全都需要登录
|
||
|
|
|
||
|
|
- [/cloud.Disk/List](#clouddisklist)
|
||
|
|
- [/cloud.Disk/DirTree](#clouddiskdirtree)
|
||
|
|
- [/cloud.Disk/Download](#clouddiskdownload)
|
||
|
|
- [/cloud.Disk/Make](#clouddiskmake)
|
||
|
|
- [/cloud.Disk/Rename](#clouddiskrename)
|
||
|
|
- [/cloud.Disk/Remove](#clouddiskremove)
|
||
|
|
- [/cloud.Disk/Move](#clouddiskmove)
|
||
|
|
- [/cloud.Disk/Copy](#clouddiskcopy)
|
||
|
|
- [/cloud.Disk/Share](#clouddiskshare)
|
||
|
|
- [/cloud.Disk/ParseShare](#clouddiskparseshare)
|
||
|
|
|
||
|
|
## /cloud.Disk/List
|
||
|
|
|
||
|
|
本级目录列表
|
||
|
|
|
||
|
|
|
||
|
|
### Request
|
||
|
|
```javascript
|
||
|
|
{
|
||
|
|
identity: "", // type<string>, 文件夹唯一标识,获取顶级的不传
|
||
|
|
name: "", // type<string>, 根据文件名称模糊查找,当该字段不为空时identity的限定失效
|
||
|
|
}
|
||
|
|
```
|
||
|
|
|
||
|
|
### Reply
|
||
|
|
```javascript
|
||
|
|
{
|
||
|
|
list: [{
|
||
|
|
identity: "", // type<string>, 唯一标识
|
||
|
|
name: "", // type<string>, 文件/文件夹名称
|
||
|
|
ext: "", // type<string>, 后缀,文件夹时为空
|
||
|
|
parent: [""], // list<string>, 父级文件夹序列,按文件名称查询时候生效
|
||
|
|
file: {
|
||
|
|
identity: "", // type<string>, 唯一标识
|
||
|
|
path: "", // type<string>, 文件路径
|
||
|
|
size: "0", // type<int64>, 文件大小,单位:B
|
||
|
|
}, // type<File>, 文件信息
|
||
|
|
created_at: "", // type<string>
|
||
|
|
updated_at: "", // type<string>
|
||
|
|
children: [{}], // list<UserFile>, 子文件夹
|
||
|
|
}], // list<UserFile>
|
||
|
|
}
|
||
|
|
```
|
||
|
|
## /cloud.Disk/DirTree
|
||
|
|
|
||
|
|
目录树
|
||
|
|
|
||
|
|
|
||
|
|
### Request
|
||
|
|
```javascript
|
||
|
|
{
|
||
|
|
identity: "", // type<string>, 文件夹唯一标识,获取顶级的不传
|
||
|
|
}
|
||
|
|
```
|
||
|
|
|
||
|
|
### Reply
|
||
|
|
```javascript
|
||
|
|
{
|
||
|
|
list: [{
|
||
|
|
identity: "", // type<string>, 唯一标识
|
||
|
|
name: "", // type<string>, 文件/文件夹名称
|
||
|
|
ext: "", // type<string>, 后缀,文件夹时为空
|
||
|
|
parent: [""], // list<string>, 父级文件夹序列,按文件名称查询时候生效
|
||
|
|
file: {
|
||
|
|
identity: "", // type<string>, 唯一标识
|
||
|
|
path: "", // type<string>, 文件路径
|
||
|
|
size: "0", // type<int64>, 文件大小,单位:B
|
||
|
|
}, // type<File>, 文件信息
|
||
|
|
created_at: "", // type<string>
|
||
|
|
updated_at: "", // type<string>
|
||
|
|
children: [{}], // list<UserFile>, 子文件夹
|
||
|
|
}], // list<UserFile>, 只返回文件夹
|
||
|
|
}
|
||
|
|
```
|
||
|
|
## /cloud.Disk/Download
|
||
|
|
|
||
|
|
本级及子级递归列表
|
||
|
|
|
||
|
|
|
||
|
|
### Request
|
||
|
|
```javascript
|
||
|
|
{
|
||
|
|
list: [""], // list<string>, identity列表,必传
|
||
|
|
}
|
||
|
|
```
|
||
|
|
|
||
|
|
### Reply
|
||
|
|
```javascript
|
||
|
|
{
|
||
|
|
list: [{
|
||
|
|
identity: "", // type<string>, 唯一标识
|
||
|
|
name: "", // type<string>, 文件/文件夹名称
|
||
|
|
ext: "", // type<string>, 后缀,文件夹时为空
|
||
|
|
parent: [""], // list<string>, 父级文件夹序列,按文件名称查询时候生效
|
||
|
|
file: {
|
||
|
|
identity: "", // type<string>, 唯一标识
|
||
|
|
path: "", // type<string>, 文件路径
|
||
|
|
size: "0", // type<int64>, 文件大小,单位:B
|
||
|
|
}, // type<File>, 文件信息
|
||
|
|
created_at: "", // type<string>
|
||
|
|
updated_at: "", // type<string>
|
||
|
|
children: [{}], // list<UserFile>, 子文件夹
|
||
|
|
}], // list<UserFile>
|
||
|
|
}
|
||
|
|
```
|
||
|
|
## /cloud.Disk/Make
|
||
|
|
|
||
|
|
创建文件/文件夹
|
||
|
|
|
||
|
|
|
||
|
|
### Request
|
||
|
|
```javascript
|
||
|
|
{
|
||
|
|
name: "", // type<string>, 文件/文件夹名称,必传
|
||
|
|
ext: "", // type<string>, 后缀,文件夹传空即可
|
||
|
|
parent_identity: "", // type<string>, 父文件夹标识,选填
|
||
|
|
size: "0", // type<int64>, 文件大小,非文件夹时必传,单位:B
|
||
|
|
hash: "", // type<string>, 文件hash值,非文件夹时必传
|
||
|
|
path: "", // type<string>, 文件地址,非文件夹时必传
|
||
|
|
}
|
||
|
|
```
|
||
|
|
|
||
|
|
### Reply
|
||
|
|
```javascript
|
||
|
|
{
|
||
|
|
identity: "", // type<string>
|
||
|
|
}
|
||
|
|
```
|
||
|
|
## /cloud.Disk/Rename
|
||
|
|
|
||
|
|
修改文件/文件夹名称
|
||
|
|
|
||
|
|
|
||
|
|
### Request
|
||
|
|
```javascript
|
||
|
|
{
|
||
|
|
identity: "", // type<string>, 必传
|
||
|
|
name: "", // type<string>, 文件/文件夹名称,必传
|
||
|
|
ext: "", // type<string>, 后缀,文件夹传空即可
|
||
|
|
}
|
||
|
|
```
|
||
|
|
|
||
|
|
### Reply
|
||
|
|
```javascript
|
||
|
|
{}
|
||
|
|
```
|
||
|
|
## /cloud.Disk/Remove
|
||
|
|
|
||
|
|
移除文件/文件夹及其子级递归列表
|
||
|
|
|
||
|
|
|
||
|
|
### Request
|
||
|
|
```javascript
|
||
|
|
{
|
||
|
|
list: [""], // list<string>, identity列表
|
||
|
|
}
|
||
|
|
```
|
||
|
|
|
||
|
|
### Reply
|
||
|
|
```javascript
|
||
|
|
{}
|
||
|
|
```
|
||
|
|
## /cloud.Disk/Move
|
||
|
|
|
||
|
|
移动文件/文件夹及其子级递归列表
|
||
|
|
|
||
|
|
|
||
|
|
### Request
|
||
|
|
```javascript
|
||
|
|
{
|
||
|
|
list: [""], // list<string>, identity列表
|
||
|
|
target_identity: "", // type<string>, 目标文件夹标识,如果是顶级则不填
|
||
|
|
}
|
||
|
|
```
|
||
|
|
|
||
|
|
### Reply
|
||
|
|
```javascript
|
||
|
|
{}
|
||
|
|
```
|
||
|
|
## /cloud.Disk/Copy
|
||
|
|
|
||
|
|
复制文件/文件夹及其子级递归列表
|
||
|
|
|
||
|
|
|
||
|
|
### Request
|
||
|
|
```javascript
|
||
|
|
{
|
||
|
|
list: [""], // list<string>, identity列表
|
||
|
|
target_identity: "", // type<string>, 目标文件夹标识,如果是顶级则不填
|
||
|
|
}
|
||
|
|
```
|
||
|
|
|
||
|
|
### Reply
|
||
|
|
```javascript
|
||
|
|
{}
|
||
|
|
```
|
||
|
|
## /cloud.Disk/Share
|
||
|
|
|
||
|
|
分享文件/文件夹及其子级递归列表
|
||
|
|
|
||
|
|
|
||
|
|
### Request
|
||
|
|
```javascript
|
||
|
|
{
|
||
|
|
list: [""], // list<string>, identity列表
|
||
|
|
days: "0", // type<int64>, 有效天数,默认永久
|
||
|
|
}
|
||
|
|
```
|
||
|
|
|
||
|
|
### Reply
|
||
|
|
```javascript
|
||
|
|
{
|
||
|
|
key: "", // type<string>, 解析分享内容关键key
|
||
|
|
}
|
||
|
|
```
|
||
|
|
## /cloud.Disk/ParseShare
|
||
|
|
|
||
|
|
解析分享内容
|
||
|
|
|
||
|
|
|
||
|
|
### Request
|
||
|
|
```javascript
|
||
|
|
{
|
||
|
|
key: "", // type<string>, 解析分享内容关键key
|
||
|
|
}
|
||
|
|
```
|
||
|
|
|
||
|
|
### Reply
|
||
|
|
```javascript
|
||
|
|
{
|
||
|
|
list: [{
|
||
|
|
identity: "", // type<string>, 唯一标识
|
||
|
|
name: "", // type<string>, 文件/文件夹名称
|
||
|
|
ext: "", // type<string>, 后缀,文件夹时为空
|
||
|
|
parent: [""], // list<string>, 父级文件夹序列,按文件名称查询时候生效
|
||
|
|
file: {
|
||
|
|
identity: "", // type<string>, 唯一标识
|
||
|
|
path: "", // type<string>, 文件路径
|
||
|
|
size: "0", // type<int64>, 文件大小,单位:B
|
||
|
|
}, // type<File>, 文件信息
|
||
|
|
created_at: "", // type<string>
|
||
|
|
updated_at: "", // type<string>
|
||
|
|
children: [{}], // list<UserFile>, 子文件夹
|
||
|
|
}], // list<UserFile>
|
||
|
|
}
|
||
|
|
```
|
||
|
|
|