提交 2e0305e1 编写于 作者: W wenlong_12

fixed fbf27897 from https://gitee.com/wenlong_12/docs/pulls/17342

fileio接口升级为fs,更新文档
Signed-off-by: Nwenlong_12 <wenlong12@huawei.com>
上级 7970313a
......@@ -178,7 +178,7 @@ getServiceDump(serviceid : number, fd : number, args : Array\<string>) : void
**示例:**
```js
import fileio from '@ohos.fileio'
import fs from '@ohos.file.fs'
import hidebug from '@ohos.hidebug'
import featureAbility from '@ohos.ability.featureAbility'
......@@ -186,7 +186,7 @@ let context = featureAbility.getContext();
context.getFilesDir().then((data) => {
var path = data + "/serviceInfo.txt"
console.info("output path: " + path)
let fd = fileio.openSync(path, 0o102, 0o666)
let fd = fs.openSync(path, 0o102, 0o666)
var serviceId = 10
var args = new Array("allInfo")
try {
......@@ -195,7 +195,7 @@ context.getFilesDir().then((data) => {
console.info(error.code)
console.info(error.message)
}
fileio.closeSync(fd);
fs.closeSync(fd);
})
```
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册