🧑‍💻 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:
ytm157 2024-08-28 17:45:09 +08:00 committed by GitHub
parent b062d3f45f
commit 593e3141ab
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 76 additions and 0 deletions

View file

@ -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 {