获取文件列表
接口说明
- 请求地址:/api/filelist
- 请求方法:GET
- 需要认证:否
请求参数
参数名称 | 示例值 | 类型 | 是否必须 | 说明 |
---|---|---|---|---|
path | /zdir | string | 是 | 需要获取的目录 |
注意:path参数需要以/
开头
请求成功
{
"code": 200,
"data": [
{
"Name": "3.0.0",
"Size": 4096,
"Mtime": "2022-10-18 12:48:35",
"Ftype": "folder",
"Fpath": "/zdir/3.0.0",
"Ext": "",
"Link": "http://soft.xiaoz.org/public%2Fzdir%2F3.0.0"
},
{
"Name": "sh",
"Size": 4096,
"Mtime": "2022-10-26 10:07:00",
"Ftype": "folder",
"Fpath": "/zdir/sh",
"Ext": "",
"Link": "http://soft.xiaoz.org/public%2Fzdir%2Fsh"
},
{
"Name": "zdir_3.1.0_linux_amd64.tar.gz",
"Size": 4038550,
"Mtime": "2022-10-25 19:55:10",
"Ftype": "file",
"Fpath": "/zdir/zdir_3.1.0_linux_amd64.tar.gz",
"Ext": "gz",
"Link": "http://soft.xiaoz.org/public%2Fzdir%2Fzdir_3.1.0_linux_amd64.tar.gz"
},
{
"Name": "zdir_3.1.0_windows_amd64.tar.gz",
"Size": 11470456,
"Mtime": "2022-10-25 20:17:29",
"Ftype": "file",
"Fpath": "/zdir/zdir_3.1.0_windows_amd64.tar.gz",
"Ext": "gz",
"Link": "http://soft.xiaoz.org/public%2Fzdir%2Fzdir_3.1.0_windows_amd64.tar.gz"
}
],
"msg": "success"
}
请求失败
{
"code": -1000,
"data": "",
"msg": "文件夹不存在!"
}
无评论