mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-06 08:48:49 +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
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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue