From b2ac1ed18eb494dbc20e5e4a322e0a27a9fb637c Mon Sep 17 00:00:00 2001 From: junyi233 Date: Tue, 25 Apr 2023 06:13:01 +0000 Subject: [PATCH] =?UTF-8?q?=E3=80=90vod=E9=97=AE=E9=A2=98=E3=80=91?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=80=E4=B8=AA=E5=8F=82=E6=95=B0=E5=91=BD?= =?UTF-8?q?=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: junyi233 --- zh-cn/application-dev/reference/apis/js-apis-zlib.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/zh-cn/application-dev/reference/apis/js-apis-zlib.md b/zh-cn/application-dev/reference/apis/js-apis-zlib.md index 8be5703008..72a2eeef8f 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-zlib.md +++ b/zh-cn/application-dev/reference/apis/js-apis-zlib.md @@ -255,7 +255,7 @@ decompressFile(inFile: string, outFile: string, options: Options, callback: Asyn // 代码中使用的路径需为应用的沙箱路径,如/data/storage/el2/base/haps,也可以通过context获取 import zlib from '@ohos.zlib'; let inFile = '/xx/xxx.zip'; -let outFile = '/xxx'; +let outFileDir = '/xxx'; let options = { level: zlib.CompressLevel.COMPRESS_LEVEL_DEFAULT_COMPRESSION, memLevel: zlib.MemLevel.MEM_LEVEL_DEFAULT, @@ -263,7 +263,7 @@ let options = { }; try { - zlib.decompressFile(inFile, outFile, options, (errData) => { + zlib.decompressFile(inFile, outFileDir, options, (errData) => { if (errData !== null) { console.log(`errData is errCode:${errData.code} message:${errData.message}`); } @@ -303,7 +303,7 @@ decompressFile(inFile: string, outFile: string, options: Options): Promise\ { + zlib.decompressFile(inFile, outFileDir, options).then((data) => { console.info('decompressFile success'); }).catch((errData) => { console.log(`errData is errCode:${errData.code} message:${errData.message}`); -- GitLab