mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-03-03 02:37:02 +00:00
🎨 提供列出文件 API Fix https://github.com/siyuan-note/siyuan/issues/7765
This commit is contained in:
30
API.md
30
API.md
@@ -39,6 +39,7 @@
|
||||
* [Get file](#Get-file)
|
||||
* [Put file](#Put-file)
|
||||
* [Remove file](#Remove-file)
|
||||
* [List files](#List-files)
|
||||
* [Export](#Export)
|
||||
* [Export Markdown](#Export-Markdown)
|
||||
* [Notification](#Notification)
|
||||
@@ -886,6 +887,35 @@ View API token in <kbd>Settings - About</kbd>, request header: `Authorization: T
|
||||
}
|
||||
```
|
||||
|
||||
### List files
|
||||
|
||||
* `/api/file/readDir`
|
||||
* Parameters
|
||||
|
||||
```json
|
||||
{
|
||||
"path": "/data/20210808180117-6v0mkxr/20200923234011-ieuun1p.sy"
|
||||
}
|
||||
```
|
||||
* `path`: the file path under the workspace path
|
||||
* Return value
|
||||
|
||||
```json
|
||||
{
|
||||
"code": 0,
|
||||
"msg": "",
|
||||
"data": [
|
||||
{
|
||||
"isDir": true,
|
||||
"name": "20210808180320-abz7w6k"
|
||||
},
|
||||
{
|
||||
"isDir": false,
|
||||
"name": "20210808180320-abz7w6k.sy"
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
## Export
|
||||
|
||||
|
||||
Reference in New Issue
Block a user