mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 22:50:13 +01:00
🎨 提供列出文件 API Fix https://github.com/siyuan-note/siyuan/issues/7765
This commit is contained in:
parent
9b5c94c62e
commit
14eb29b26c
4 changed files with 110 additions and 0 deletions
31
API_zh_CN.md
31
API_zh_CN.md
|
|
@ -39,6 +39,7 @@
|
|||
* [获取文件](#获取文件)
|
||||
* [写入文件](#写入文件)
|
||||
* [删除文件](#删除文件)
|
||||
* [列出文件](#列出文件)
|
||||
* [导出](#导出)
|
||||
* [导出 Markdown 文本](#导出-markdown-文本)
|
||||
* [通知](#通知)
|
||||
|
|
@ -880,6 +881,36 @@
|
|||
}
|
||||
```
|
||||
|
||||
### 列出文件
|
||||
|
||||
* `/api/file/readDir`
|
||||
* 参数
|
||||
|
||||
```json
|
||||
{
|
||||
"path": "/data/20210808180117-6v0mkxr/20200923234011-ieuun1p.sy"
|
||||
}
|
||||
```
|
||||
* `path`:工作空间路径下的文件路径
|
||||
* 返回值
|
||||
|
||||
```json
|
||||
{
|
||||
"code": 0,
|
||||
"msg": "",
|
||||
"data": [
|
||||
{
|
||||
"isDir": true,
|
||||
"name": "20210808180320-abz7w6k"
|
||||
},
|
||||
{
|
||||
"isDir": false,
|
||||
"name": "20210808180320-abz7w6k.sy"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
## 导出
|
||||
|
||||
### 导出 Markdown 文本
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue