提交 98063617 编写于 作者: 1 18721213663

bugfix fs feature on 3.2r

Signed-off-by: N18721213663 <zhuhongtao12@huawei.com>
上级 c9875e60
......@@ -2573,7 +2573,7 @@ close(callback: AsyncCallback&lt;void&gt;): void
if (err) {
console.info("close stream failed with error message: " + err.message + ", error code: " + err.code);
} else {
console.info("close stream success"):
console.info("close stream success");
}
});
```
......
......@@ -20,8 +20,9 @@ import fileio from '@ohos.fileio';
**Stage模型**
```js
import Ability from '@ohos.application.Ability';
class MainAbility extends Ability {
import UIAbility from '@ohos.app.ability.UIAbility';
export default class EntryAbility extends UIAbility {
onWindowStageCreate(windowStage) {
let context = this.context;
let pathDir = context.filesDir;
......@@ -29,19 +30,18 @@ class MainAbility extends Ability {
}
```
Stage模型context的具体获取方法参见[Stage模型](js-apis-inner-application-uiAbilityContext.md)
**FA模型**
```js
import featureAbility from '@ohos.ability.featureAbility';
let context = featureAbility.getContext();
context.getFilesDir().then((data) => {
let pathDir = data;
})
```
FA模型context的具体获取方法参见[FA模型](js-apis-inner-app-context.md#Context模块)
FA模型context的具体获取方法参见[FA模型](js-apis-inner-app-context.md#Context模块)
## fileio.stat
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册