未验证 提交 1fa93889 编写于 作者: O openharmony_ci 提交者: Gitee

!17370 接口升级为fs,更新文档 合3.2release

Merge pull request !17370 from wenlong_12/cherry-pick-1681802825
......@@ -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.
先完成此消息的编辑!
想要评论请 注册