提交 57f4136f 编写于 作者: W wusongqing

updated docs

Signed-off-by: Nwusongqing <wusongqing@huawei.com>
上级 1797374e
...@@ -518,7 +518,7 @@ Obtains the cache directory of the application on the internal storage. This API ...@@ -518,7 +518,7 @@ Obtains the cache directory of the application on the internal storage. This API
```js ```js
import featureAbility from '@ohos.ability.featureAbility' import featureAbility from '@ohos.ability.featureAbility'
var context = featureAbility.getCacheDir(); var context = featureAbility.getContext();
context.getCacheDir((err, data) => { context.getCacheDir((err, data) => {
if (err) { if (err) {
console.error('Operation failed. Cause: ' + JSON.stringify(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 ...@@ -571,7 +571,7 @@ Obtains the file directory of the application on the internal storage. This API
```js ```js
import featureAbility from '@ohos.ability.featureAbility' import featureAbility from '@ohos.ability.featureAbility'
var context = featureAbility.getFilesDir(); var context = featureAbility.getContext();
context.getFilesDir((err, data) => { context.getFilesDir((err, data) => {
if (err) { if (err) {
console.error('Operation failed. Cause: ' + JSON.stringify(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.
先完成此消息的编辑!
想要评论请 注册