🎨 Add Unzip API for HarmonyOS

This commit is contained in:
Daniel 2024-12-30 22:15:31 +08:00
parent 68c82eaebe
commit 4d48492a05
No known key found for this signature in database
GPG key ID: 86211BA83DF03017

View file

@ -24,6 +24,7 @@ import (
"strings"
"time"
"github.com/88250/gulu"
"github.com/siyuan-note/filelock"
"github.com/siyuan-note/logging"
"github.com/siyuan-note/siyuan/kernel/cache"
@ -130,4 +131,11 @@ func DisableFeature(feature *C.char) {
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() {}