> - 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.
...
...
@@ -12,28 +12,29 @@ import document from '@ohos.document';
## 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.
> 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
...
...
@@ -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).
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:
**System API**: This is a system API and cannot be called by third-party applications.
- Parameters
This is a system API and cannot be called by third-party applications.
**Parameters**
| Name | Type | Mandatory| Description|
| ---------- | ------ | ---- | ---- |
| userId | string | No | User ID.<br>- Set this parameter to the ID of the user to be queried.<br>- If no value is specified, information about the current user is queried.|
| userId | string | No | User ID.<br>Value:<br>- Set this parameter to the ID of the user to be queried.<br>- If no value is specified, information about the current user is queried.|
- Return value
**Return value**
| Type | Description |
| --------------------- | ---------------- |
| Promise<[StorageStats](#StorageStats)> | Promise used to return the information obtained.|
| userId | string | No | User ID.<br>- Set this parameter to the ID of the user to be queried.<br>- If no value is specified, information about the current user is queried. |
| userId | string | No | User ID.<br>Value:<br>- Set this parameter to the ID of the user to be queried.<br>- If no value is specified, information about the current user is queried. |
| callback | callback:AsyncCallback<[StorageStats](#StorageStats)> | Yes | Callback invoked to return the information obtained.|