mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-20 16:40:13 +01:00
🎨 Add Unzip API for HarmonyOS
This commit is contained in:
parent
68c82eaebe
commit
4d48492a05
1 changed files with 8 additions and 0 deletions
|
|
@ -24,6 +24,7 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"github.com/88250/gulu"
|
||||||
"github.com/siyuan-note/filelock"
|
"github.com/siyuan-note/filelock"
|
||||||
"github.com/siyuan-note/logging"
|
"github.com/siyuan-note/logging"
|
||||||
"github.com/siyuan-note/siyuan/kernel/cache"
|
"github.com/siyuan-note/siyuan/kernel/cache"
|
||||||
|
|
@ -130,4 +131,11 @@ func DisableFeature(feature *C.char) {
|
||||||
util.DisableFeature(C.GoString(feature))
|
util.DisableFeature(C.GoString(feature))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//export Unzip
|
||||||
|
func Unzip(zipFilePath, destination string) {
|
||||||
|
if err := gulu.Zip.Unzip(zipFilePath, destination); nil != err {
|
||||||
|
logging.LogErrorf("unzip [%s] failed: %s", zipFilePath, err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func main() {}
|
func main() {}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue