mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-28 01:44:07 +01:00
🧑💻 Add a kernel API /api/filetree/getPathByID
* 🧑💻 Add a new api '/api/filetree/getPathByID' * 🧑💻 Add a new api '/api/filetree/getPathByID'
This commit is contained in:
parent
b062d3f45f
commit
593e3141ab
5 changed files with 76 additions and 0 deletions
|
|
@ -1327,6 +1327,15 @@ func GetHPathByID(id string) (hPath string, err error) {
|
|||
return
|
||||
}
|
||||
|
||||
func GetPathByID(id string) (hPath string, err error) {
|
||||
tree, err := LoadTreeByBlockID(id)
|
||||
if nil != err {
|
||||
return
|
||||
}
|
||||
hPath = tree.Path
|
||||
return
|
||||
}
|
||||
|
||||
func GetFullHPathByID(id string) (hPath string, err error) {
|
||||
tree, err := LoadTreeByBlockID(id)
|
||||
if nil != err {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue