mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-09-22 00:20:47 +02:00
🎨 Add kernel API /api/file/renameFile
https://github.com/siyuan-note/siyuan/issues/8328
This commit is contained in:
parent
68a674b11e
commit
e4229f2bad
6 changed files with 82 additions and 1 deletions
24
API.md
24
API.md
|
@ -42,6 +42,7 @@
|
|||
* [Get file](#Get-file)
|
||||
* [Put file](#Put-file)
|
||||
* [Remove file](#Remove-file)
|
||||
* [Rename file](#Rename-file)
|
||||
* [List files](#List-files)
|
||||
* [Export](#Export)
|
||||
* [Export Markdown](#Export-Markdown)
|
||||
|
@ -1003,6 +1004,29 @@ View API token in <kbd>Settings - About</kbd>, request header: `Authorization: T
|
|||
}
|
||||
```
|
||||
|
||||
### Rename file
|
||||
|
||||
* `/api/file/renameFile`
|
||||
* Parameters
|
||||
|
||||
```json
|
||||
{
|
||||
"path": "/data/assets/image-20230523085812-k3o9t32.png",
|
||||
"newPath": "/data/assets/test-20230523085812-k3o9t32.png"
|
||||
}
|
||||
```
|
||||
* `path`: the file path under the workspace path
|
||||
* `newPath`: the new file path under the workspace path
|
||||
* Return value
|
||||
|
||||
```json
|
||||
{
|
||||
"code": 0,
|
||||
"msg": "",
|
||||
"data": null
|
||||
}
|
||||
```
|
||||
|
||||
### List files
|
||||
|
||||
* `/api/file/readDir`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue