> 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.
| 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<number> | 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<number> | Yes | Callback used to return the check result. The value **0** means that the application has the specified permission, and **-1** means the opposite. |
| 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<number> | Promise used to return the check result. The value **0** means that the application has the specified permission, and **-1** means the opposite.|
| Promise<number> | Promise used to return the check result. The value **0** means that the application has the specified permission, and **-1** means the opposite. |