diff --git a/api/@ohos.fileshare.d.ts b/api/@ohos.fileshare.d.ts index d40e87b1ca27f20b539ba4bde3c70703c7230ca2..066ccca436f0431aea5be670afbd70920bb79094 100644 --- a/api/@ohos.fileshare.d.ts +++ b/api/@ohos.fileshare.d.ts @@ -52,6 +52,30 @@ declare namespace fileShare { * @since 11 */ WRITE_MODE = 0b10, + + /** + * Indicates create permissions. + * + * @syscap SystemCapability.FileManagement.AppFileService.FolderAuthorization + * @since 20 + */ + CREATE_MODE = 0b100, + + /** + * Indicates delete permissions. + * + * @syscap SystemCapability.FileManagement.AppFileService.FolderAuthorization + * @since 20 + */ + DELETE_MODE = 0b1000, + + /** + * Indicates rename permissions. + * + * @syscap SystemCapability.FileManagement.AppFileService.FolderAuthorization + * @since 20 + */ + RENAME_MODE = 0b10000, } /** @@ -253,6 +277,22 @@ declare namespace fileShare { */ function grantUriPermission(uri: string, bundleName: string, flag: wantConstant.Flags): Promise; + /** + * Provides grant uri permission for app + * + * @permission ohos.permission.FILE_ACCESS_MANAGER + * @param { Array } policies - Policy information to grant permission on URIs. + * @param { string } targetBundleName - Indicates the bundle name of authorization target. + * @param { number } appCloneIndex - Indicates the clone index of target application. + * @returns { Promise } no callback return Promise otherwise return void. + * @throws { BusinessError } 201 - Permission verification failed + * @throws { BusinessError } 202 - The caller is not a system application + * @syscap SystemCapability.FileManagement.AppFileService.FolderAuthorization + * @systemapi + * @since 20 + */ + function grantUriPermission(policies: Array, targetBundleName: string, appCloneIndex: number): Promise; + /** * Set persistence permissions for the URI *