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

!3297 Done! 3269:修复元能力接口资料示例代码错误

Merge pull request !3297 from wusongqing/TR3269
......@@ -518,7 +518,7 @@ Obtains the cache directory of the application on the internal storage. This API
```js
import featureAbility from '@ohos.ability.featureAbility'
var context = featureAbility.getCacheDir();
var context = featureAbility.getContext();
context.getCacheDir((err, data) => {
if (err) {
console.error('Operation failed. Cause: ' + JSON.stringify(err));
......@@ -571,7 +571,7 @@ Obtains the file directory of the application on the internal storage. This API
```js
import featureAbility from '@ohos.ability.featureAbility'
var context = featureAbility.getFilesDir();
var context = featureAbility.getContext();
context.getFilesDir((err, data) => {
if (err) {
console.error('Operation failed. Cause: ' + JSON.stringify(err));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册