From 8db50160d7fd2b30448eec3aed3c0e07dbb44300 Mon Sep 17 00:00:00 2001 From: raoxian Date: Thu, 16 Jun 2022 17:09:51 +0800 Subject: [PATCH] update js-apis-fileio.md Signed-off-by: raoxian --- zh-cn/application-dev/reference/apis/js-apis-fileio.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/zh-cn/application-dev/reference/apis/js-apis-fileio.md b/zh-cn/application-dev/reference/apis/js-apis-fileio.md index 407b3c4be0..372913f694 100644 --- a/zh-cn/application-dev/reference/apis/js-apis-fileio.md +++ b/zh-cn/application-dev/reference/apis/js-apis-fileio.md @@ -603,9 +603,9 @@ openSync(path:string, flags?:number, mode?:number): number ```js let fd = fileio.openSync(path, 0o102, 0o666); fileio.writeSync(fd, 'hello world'); - let fd = fileio.openSync(path, 0o2002); - fileio.writeSync(fd, 'hello world'); - let num = fileio.readSync(fd, new ArrayBuffer(4096), {position: 0}); + let fd1 = fileio.openSync(path, 0o2002); + fileio.writeSync(fd1, 'hello world'); + let num = fileio.readSync(fd1, new ArrayBuffer(4096), {position: 0}); console.info("num == " + num); ``` -- GitLab