mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 14:40:12 +01: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_zh_CN.md
24
API_zh_CN.md
|
|
@ -42,6 +42,7 @@
|
|||
* [获取文件](#获取文件)
|
||||
* [写入文件](#写入文件)
|
||||
* [删除文件](#删除文件)
|
||||
* [重命名文件](#重命名文件)
|
||||
* [列出文件](#列出文件)
|
||||
* [导出](#导出)
|
||||
* [导出 Markdown 文本](#导出-markdown-文本)
|
||||
|
|
@ -995,6 +996,29 @@
|
|||
}
|
||||
```
|
||||
|
||||
### 重命名文件
|
||||
|
||||
* `/api/file/renameFile`
|
||||
* 参数
|
||||
|
||||
```json
|
||||
{
|
||||
"path": "/data/assets/image-20230523085812-k3o9t32.png",
|
||||
"newPath": "/data/assets/test-20230523085812-k3o9t32.png"
|
||||
}
|
||||
```
|
||||
* `path`:工作空间路径下的文件路径
|
||||
* `newPath`:新的文件路径
|
||||
* 返回值
|
||||
|
||||
```json
|
||||
{
|
||||
"code": 0,
|
||||
"msg": "",
|
||||
"data": null
|
||||
}
|
||||
```
|
||||
|
||||
### 列出文件
|
||||
|
||||
* `/api/file/readDir`
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue