回复
HarmonyOS应用API-zlib.unzipFile
鸿蒙时代
发布于 2022-11-4 10:14
浏览
0收藏
Api: zlib.unzipFile
版本适配:Api6
作用:解压文件,解压完成返回执行结果
示例代码:
import zlib from '@ohos.zlib'
var inFile = "/xx/xxx.zip";
var outFile = "/xxx";
let options = {
level: zlib.CompressLevel.COMPRESS_LEVEL_DEFAULT_COMPRESSION,
memLevel: zlib.MemLevel.MEM_LEVEL_DEFAULT,
strategy: zlib.CompressStrategy.COMPRESS_STRATEGY_DEFAULT_STRATEGY
};
zlib.unzipFile(inFile, outFile, options).then((data) => {
console.log("unzipFile result:" + data);
}).catch((err)=>{
console.log("catch((err)=>" + err);
})
标签
HarmonyOS应用API-zlib.unzipFile.docx 16.67K 20次下载
赞
收藏
回复
相关推荐