- 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.
## Modules to Import
## Modules to Import
...
@@ -12,109 +12,115 @@ import document from '@ohos.document';
...
@@ -12,109 +12,115 @@ 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 method 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.
Manages file data security levels, including obtaining and setting file data security levels.
## Modules to Import
```js
importsecurityLabelfrom'@ohos.securityLabel';
```
## Usage
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).