未验证 提交 cc8a63a1 编写于 作者: K king_he 提交者: Gitee

update en/application-dev/reference/apis/js-apis-uripermissionmanager.md.

Signed-off-by: Nking_he <6384784@qq.com>
上级 c9b2f7bb
# uriPermissionManager # uriPermissionManager
> ![icon-note.gif](public_sys-resources/icon-note.gif) **NOTE** > **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 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.
...@@ -27,12 +27,12 @@ SystemCapability.Ability.AbilityRuntime.Core ...@@ -27,12 +27,12 @@ SystemCapability.Ability.AbilityRuntime.Core
**Parameters** **Parameters**
| Name| Type| Mandatory| Description| | Name | Type | Mandatory | Description |
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| uri | string | Yes| URI of a file, for example, **fileshare:///com.samples.filesharetest.FileShare/person/10**.| | uri | string | Yes | URI of a file, for example, **fileshare:///com.samples.filesharetest.FileShare/person/10**. |
| flag | wantConstant.Flags | Yes| Read or write permission on the file specified by the URI.| | flag | wantConstant.Flags | Yes | Read or write permission on the file specified by the URI. |
| accessTokenId | number | Yes| Unique ID of an application, which is obtained through the **BundleManager** API.| | accessTokenId | number | Yes | Unique ID of an application, which is obtained through the **BundleManager** API. |
| callback | AsyncCallback&lt;number&gt; | Yes| Callback used to return the check result. The value **0** means that the application has the specified permission, and **-1** means the opposite.| | callback | AsyncCallback&lt;number&gt; | Yes | Callback used to return the check result. The value **0** means that the application has the specified permission, and **-1** means the opposite. |
**Example** **Example**
...@@ -56,17 +56,17 @@ SystemCapability.Ability.AbilityRuntime.Core ...@@ -56,17 +56,17 @@ SystemCapability.Ability.AbilityRuntime.Core
**Parameters** **Parameters**
| Name| Type| Mandatory| Description| | Name | Type | Mandatory | Description |
| -------- | -------- | -------- | -------- | | -------- | -------- | -------- | -------- |
| uri | string | Yes| URI of a file, for example, **fileshare:///com.samples.filesharetest.FileShare/person/10**.| | uri | string | Yes | URI of a file, for example, **fileshare:///com.samples.filesharetest.FileShare/person/10**. |
| flag | wantConstant.Flags | Yes| Read or write permission on the file specified by the URI.| | flag | wantConstant.Flags | Yes | Read or write permission on the file specified by the URI. |
| accessTokenId | number | Yes| Unique ID of an application, which is obtained through the **BundleManager** API.| | accessTokenId | number | Yes | Unique ID of an application, which is obtained through the **BundleManager** API. |
**Return value** **Return value**
| Type| Description| | Type | Description |
| -------- | -------- | | -------- | -------- |
| Promise&lt;number&gt; | Promise used to return the check result. The value **0** means that the application has the specified permission, and **-1** means the opposite.| | Promise&lt;number&gt; | Promise used to return the check result. The value **0** means that the application has the specified permission, and **-1** means the opposite. |
**Example** **Example**
...@@ -78,4 +78,4 @@ SystemCapability.Ability.AbilityRuntime.Core ...@@ -78,4 +78,4 @@ SystemCapability.Ability.AbilityRuntime.Core
}).catch((error) => { }).catch((error) => {
console.log('Verification failed.'); console.log('Verification failed.');
}) })
``` ```
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册