未验证 提交 02367f09 编写于 作者: O openharmony_ci 提交者: Gitee

!19216 更新hidebug js接口示例-4.0beta

Merge pull request !19216 from wenlong_12/cherry-pick-1685967469
......@@ -179,18 +179,18 @@ import featureAbility from '@ohos.ability.featureAbility'
let context = featureAbility.getContext();
context.getFilesDir().then((data) => {
var path = data + "/serviceInfo.txt"
console.info("output path: " + path)
let fd = fs.openSync(path, 0o102, 0o666)
var serviceId = 10
var args = new Array("allInfo")
var path = data + "/serviceInfo.txt";
console.info("output path: " + path);
let file = fs.openSync(path, fs.OpenMode.READ_WRITE | fs.OpenMode.CREATE);
var serviceId = 10;
var args = new Array("allInfo");
try {
hidebug.getServiceDump(serviceId, fd, args)
hidebug.getServiceDump(serviceId, file.fd, args);
} catch (error) {
console.info(error.code)
console.info(error.message)
console.info(error.code);
console.info(error.message);
}
fs.closeSync(fd);
fs.closeSync(file);
})
```
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册