mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 22:50:13 +01:00
🎨 Kernel API supports load plugins https://github.com/siyuan-note/siyuan/issues/8044
This commit is contained in:
parent
c62b1a102a
commit
6e864a2718
5 changed files with 36 additions and 3 deletions
|
|
@ -19,6 +19,7 @@ package model
|
|||
import (
|
||||
"crypto/sha1"
|
||||
"fmt"
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/88250/gulu"
|
||||
|
|
@ -41,6 +42,11 @@ type Petal struct {
|
|||
|
||||
func LoadPetals() (ret []*Petal) {
|
||||
petalDir := filepath.Join(util.DataDir, "storage", "petal")
|
||||
if err := os.MkdirAll(petalDir, 0755); nil != err {
|
||||
logging.LogErrorf("create petal dir [%s] failed: %s", petalDir, err)
|
||||
return
|
||||
}
|
||||
|
||||
confPath := filepath.Join(petalDir, "petals.json")
|
||||
|
||||
ret = []*Petal{}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue