未验证 提交 fbf27897 编写于 作者: W wenlong_12 提交者: Gitee

fileio接口升级为fs,更新文档

Signed-off-by: Nwenlong_12 <wenlong12@huawei.com>
上级 ac494246
......@@ -173,7 +173,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'
......@@ -181,7 +181,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 {
......@@ -190,7 +190,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.
先完成此消息的编辑!
想要评论请 注册