mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-02 11:31:41 +08:00
🧑💻 Improve kernel API /api/file/readDir
for returning file mod time Fix https://github.com/siyuan-note/siyuan/issues/8945
This commit is contained in:
parent
82633a497b
commit
6595524640
8
API.md
8
API.md
@ -1064,7 +1064,7 @@ View API token in <kbd>Settings - About</kbd>, request header: `Authorization: T
|
||||
|
||||
```json
|
||||
{
|
||||
"path": "/data/20210808180117-6v0mkxr/20200923234011-ieuun1p.sy"
|
||||
"path": "/data/20210808180117-6v0mkxr/20200923234011-ieuun1p"
|
||||
}
|
||||
```
|
||||
* `path`: the file path under the workspace path
|
||||
@ -1078,12 +1078,14 @@ View API token in <kbd>Settings - About</kbd>, request header: `Authorization: T
|
||||
{
|
||||
"isDir": true,
|
||||
"isSymlink": false,
|
||||
"name": "20210808180320-abz7w6k"
|
||||
"name": "20210808180303-6yi0dv5",
|
||||
"updated": 1691467624
|
||||
},
|
||||
{
|
||||
"isDir": false,
|
||||
"isSymlink": false,
|
||||
"name": "20210808180320-abz7w6k.sy"
|
||||
"name": "20210808180303-6yi0dv5.sy",
|
||||
"updated": 1663298365
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -1056,7 +1056,7 @@
|
||||
|
||||
```json
|
||||
{
|
||||
"path": "/data/20210808180117-6v0mkxr/20200923234011-ieuun1p.sy"
|
||||
"path": "/data/20210808180117-6v0mkxr/20200923234011-ieuun1p"
|
||||
}
|
||||
```
|
||||
* `path`:工作空间路径下的文件路径
|
||||
@ -1070,12 +1070,14 @@
|
||||
{
|
||||
"isDir": true,
|
||||
"isSymlink": false,
|
||||
"name": "20210808180320-abz7w6k"
|
||||
"name": "20210808180303-6yi0dv5",
|
||||
"updated": 1691467624
|
||||
},
|
||||
{
|
||||
"isDir": false,
|
||||
"isSymlink": false,
|
||||
"name": "20210808180320-abz7w6k.sy"
|
||||
"name": "20210808180303-6yi0dv5.sy",
|
||||
"updated": 1663298365
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -184,6 +184,7 @@ func readDir(c *gin.Context) {
|
||||
"name": entry.Name(),
|
||||
"isDir": info.IsDir(),
|
||||
"isSymlink": util.IsSymlink(entry),
|
||||
"updated": info.ModTime().Unix(),
|
||||
})
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user