> - The initial APIs of this module are supported since API version 6. Newly added APIs will be marked with a superscript to indicate their earliest API version.
> - The initial APIs of this module are supported since API version 6. Newly added APIs will be marked with a superscript to indicate their earliest API version.
> - The APIs of this module will be deprecated and are not recommended for use. An exception will be thrown if any of the APIs is called.
> - The APIs of this module will be deprecated and are not recommended for use. An exception will be thrown if any of the APIs is called.
...
@@ -12,28 +12,29 @@ import document from '@ohos.document';
...
@@ -12,28 +12,29 @@ import document from '@ohos.document';
## document.choose
## document.choose
choose(type:string[]): Promise<string>
choose(types? : string[]): Promise<string>
Chooses a file of the specified type using the file manager. This API uses a promise to return the result.
Chooses a file of the specified type using the file manager. This API uses a promise to return the result.
> 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 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 APIs of this module can be used to obtain and set file security levels.
Manages file data security levels, including obtaining and setting file data security levels.
## Modules to Import
## Modules to Import
...
@@ -15,34 +15,26 @@ import securityLabel from '@ohos.securityLabel';
...
@@ -15,34 +15,26 @@ import securityLabel from '@ohos.securityLabel';
Before using the APIs provided by this module to perform operations on a file or directory, obtain the path of the application sandbox. For details, see [getOrCreateLocalDir of the Context module](js-apis-Context.md).
Before using the APIs provided by this module to perform operations on a file or directory, obtain the path of the application sandbox. For details, see [getOrCreateLocalDir of the Context module](js-apis-Context.md).
Application sandbox path of a file or directory = Application directory + File name or directory name
For example, if the application directory obtained by using **getOrCreateLocalDir** is **dir** and the file name is **xxx.txt**, the application sandbox path of the file is as follows: