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

!1999 fix code issue

Merge pull request !1999 from 潘强标/fix
......@@ -655,13 +655,13 @@ async function example() {
let DIR_IMAGE = mediaLibrary.DirectoryType.DIR_IMAGE;
const path = await media.getPublicDirectory(DIR_IMAGE);
asset = await media.createAsset(mediaType, "image00003.jpg", path);
asset.open('rw').then((openError, fd) => {
if(fd > 0){
asset.close(fd);
}else{
console.info('File Open Failed!' + openError);
}
});
asset.open('rw')
.then((fd) => {
console.info('File fd!' + fd);
})
.catch((err) => {
console.info('File err!' + err);
});
}
```
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册