@@ -17,15 +17,31 @@ import fileio from '@ohos.fileio';
Before using the APIs provided by this module to perform operations on files or directories, obtain the path of the application sandbox as follows:
Stage Model
```js
importAbilityfrom'@ohos.application.Ability';
classMainAbilityextendsAbility{
onWindowStageCreate(windowStage){
letcontext=this.context;
letpath=context.filesDir;
}
}
```
For details about how to obtain the stage model context, see [Stage Model](https://gitee.com/openharmony/docs/blob/master/en/application-dev/reference/apis/js-apis-ability-context.md#abilitycontext).
For details about how to obtain the context of the FA model, see [FA Model](https://gitee.com/openharmony/docs/blob/master/en/application-dev/reference/apis/js-apis-Context.md#context).
## fileio.stat
...
...
@@ -654,7 +670,7 @@ Reads data from a file. This API uses a promise to return the result.
The secuityLabel module provides APIs to manage file data security levels, including obtaining and setting file data security levels.
The **secuityLabel** module provides APIs to manage file data security levels, including obtaining and setting file data security levels.
> **NOTE**<br/>
> The initial APIs of this module are supported since API version 9. Newly added APIs will be marked with a superscript to indicate their earliest API version.
The storageStatistics module provides APIs for obtaining storage space information, including the space of built-in and plug-in memory cards, space occupied by different types of data, and space of application data.
The **storageStatistics** module provides APIs for obtaining storage space information, including the space of built-in and plug-in memory cards, space occupied by different types of data, and space of application data.
> **NOTE**<br/>
>
...
...
@@ -264,14 +264,13 @@ Asynchronously obtains space information of the current third-party application.