From 87198a8338e3bdcdb8f3762b3da2ae1698755769 Mon Sep 17 00:00:00 2001 From: qinghaopeng Date: Thu, 19 Jun 2025 21:20:20 +0800 Subject: [PATCH] modify label Signed-off-by: qinghaopeng --- api/@ohos.file.photoAccessHelper.d.ts | 94 ++++++++++++++------------- 1 file changed, 49 insertions(+), 45 deletions(-) diff --git a/api/@ohos.file.photoAccessHelper.d.ts b/api/@ohos.file.photoAccessHelper.d.ts index 51a7c65e09..c83493f8d4 100644 --- a/api/@ohos.file.photoAccessHelper.d.ts +++ b/api/@ohos.file.photoAccessHelper.d.ts @@ -2164,7 +2164,15 @@ declare namespace photoAccessHelper { * * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @crossplatform - * @since arkts {'1.1':'12','1.2':'20'} + * @since 12 + */ + /** + * Asset uri, read only + * + * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core + * @crossplatform + * @atomicservice + * @since 20 * @arkts 1.1&1.2 */ URI = 'uri', @@ -2271,7 +2279,15 @@ declare namespace photoAccessHelper { * * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @crossplatform - * @since arkts {'1.1':'12','1.2':'20'} + * @since 12 + */ + /** + * Modified date of the asset, read only + * + * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core + * @crossplatform + * @atomicservice + * @since 20 * @arkts 1.1&1.2 */ DATE_MODIFIED = 'date_modified', @@ -3243,11 +3259,9 @@ declare namespace photoAccessHelper { * @since 12 */ /** - * Obtains the total number of files in the result set. + * Obtains the total number of objects in the fetch result. * * @returns { number } Total number of objects. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. * @throws { BusinessError } 13900020 - Invalid argument * @throws { BusinessError } 14000011 - System inner fail * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core @@ -3283,12 +3297,10 @@ declare namespace photoAccessHelper { * @since 12 */ /** - * Checks whether the cursor is in the last row of the result set. + * Checks whether the result set points to the last row. * You need to check whether the object is the last one before calling getNextObject. * * @returns { boolean } Whether the object is the last one in the fetch result. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. * @throws { BusinessError } 13900020 - Invalid argument * @throws { BusinessError } 14000011 - System inner fail * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core @@ -3321,11 +3333,9 @@ declare namespace photoAccessHelper { * @since 12 */ /** - * Obtains the first file asset in the result set. This API uses an asynchronous callback to return the result. + * Obtains the first object in the fetch result. * * @param { AsyncCallback } callback - Callback used to return the first file asset obtained. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. * @throws { BusinessError } 13900020 - Invalid argument * @throws { BusinessError } 14000011 - System inner fail * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core @@ -3359,11 +3369,9 @@ declare namespace photoAccessHelper { * @since 12 */ /** - * Obtains the first file asset in the result set. This API uses a promise to return the result. + * Obtains the first object in the fetch result. * * @returns { Promise } Returns the first object in the fetch result. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. * @throws { BusinessError } 13900020 - Invalid argument * @throws { BusinessError } 14000011 - System inner fail * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core @@ -3399,12 +3407,11 @@ declare namespace photoAccessHelper { * @since 12 */ /** - * Obtains the next file asset in the result set. This API uses an asynchronous callback to return the result. + * Obtains the next object in the fetch result. * Before using this API, you must use isAfterLast() to check whether the current position is the end of the result set. + * in the fetch result. This method only works when the current position is not the last row. * * @param { AsyncCallback } callback - Callback used to return the next file asset obtained. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. * @throws { BusinessError } 13900020 - Invalid argument * @throws { BusinessError } 14000011 - System inner fail * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core @@ -3440,12 +3447,11 @@ declare namespace photoAccessHelper { * @since 12 */ /** - * Obtains the next file asset in the result set. This API uses a promise to return the result. + * Obtains the next object in the fetch result. * Before using this API, you must use isAfterLast() to check whether the current position is the end of the result set. + * in the fetch result. This method only works when the current position is not the last row. * * @returns { Promise } Returns the next object - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. * @throws { BusinessError } 13900020 - Invalid argument * @throws { BusinessError } 14000011 - System inner fail * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core @@ -3479,11 +3485,9 @@ declare namespace photoAccessHelper { * @since 12 */ /** - * Obtains the last file asset in the result set. This API uses an asynchronous callback to return the result. + * Obtains the last object asset in the fetch result. * * @param { AsyncCallback } callback - Callback used to return the last file asset obtained. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. * @throws { BusinessError } 13900020 - Invalid argument * @throws { BusinessError } 14000011 - System inner fail * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core @@ -3516,11 +3520,9 @@ declare namespace photoAccessHelper { * @since 12 */ /** - * Obtains the last file asset in the result set. This API uses a promise to return the result. + * Obtains the last object asset in the fetch result. * * @returns { Promise } Returns the last object - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. * @throws { BusinessError } 13900020 - Invalid argument * @throws { BusinessError } 14000011 - System inner fail * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core @@ -3555,12 +3557,10 @@ declare namespace photoAccessHelper { * @since 12 */ /** - * Obtains a file asset with the specified index in the result set. This API uses an asynchronous callback to return the result. + * Obtains the object with the specified index in the result set. * * @param { number } index - Index of the file asset to obtain. The value starts from 0. * @param { AsyncCallback } callback - Callback used to return the file asset obtained. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 13900020 - Invalid argument * @throws { BusinessError } 14000011 - System inner fail * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core @@ -3596,12 +3596,10 @@ declare namespace photoAccessHelper { * @since 12 */ /** - * Obtains a file asset with the specified index in the result set. This API uses a promise to return the result. + * Obtains the object with the specified index in the result set. * * @param { number } index - Index of the file asset to obtain. The value starts from 0. * @returns { Promise } Returns the object - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 13900020 - Invalid argument * @throws { BusinessError } 14000011 - System inner fail * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core @@ -3635,11 +3633,9 @@ declare namespace photoAccessHelper { * @since 12 */ /** - * Obtains all the file assets in the result set. This API uses an asynchronous callback to return the result. + * Obtains all objects in the fetch result. * * @param { AsyncCallback> } callback - Callback used to return an array of all file assets in the result set. - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. * @throws { BusinessError } 13900020 - Invalid argument * @throws { BusinessError } 14000011 - System inner fail * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core @@ -3673,11 +3669,9 @@ declare namespace photoAccessHelper { * @since 12 */ /** - * Obtains all the file assets in the result set. This API uses a promise to return the result. + * Obtains all objects in the fetch result. * * @returns { Promise> } Returns all the objects - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. * @throws { BusinessError } 13900020 - Invalid argument * @throws { BusinessError } 14000011 - System inner fail * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core @@ -3709,10 +3703,8 @@ declare namespace photoAccessHelper { * @since 12 */ /** - * Closes this FetchResult instance to invalidate it. After this instance is released, the APIs in this instance cannot be invoked. + * Release the fetch result. * - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types. * @throws { BusinessError } 13900020 - Invalid argument * @throws { BusinessError } 14000011 - System inner fail * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core @@ -4703,7 +4695,21 @@ declare namespace photoAccessHelper { * @throws { BusinessError } 14000011 - System inner fail * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @crossplatform - * @since arkts {'1.1':'12','1.2':'20'} + * @since 12 + */ + /** + * Fetch photo assets + * + * @permission ohos.permission.READ_IMAGEVIDEO + * @param { FetchOptions } options - Options for fetching the image and video assets. + * @returns { Promise> } Returns the fetch result. + * @throws { BusinessError } 201 - Permission denied + * @throws { BusinessError } 13900020 - Invalid argument + * @throws { BusinessError } 14000011 - System inner fail + * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core + * @crossplatform + * @atomicservice + * @since 20 * @arkts 1.1&1.2 */ getAssets(options: FetchOptions): Promise>; @@ -4722,15 +4728,13 @@ declare namespace photoAccessHelper { * @since 12 */ /** - * Obtains burst assets. This API uses a promise to return the result. + * Fetch a group of burst assets * * @permission ohos.permission.READ_IMAGEVIDEO * @param { string } burstKey - UUID of a set of burst photos (BURST_KEY of PhotoKeys). The value is a string of 36 characters. * @param { FetchOptions } options - Options for fetching the burst photos. * @returns { Promise> } Returns the fetch result. * @throws { BusinessError } 201 - Permission denied - * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Mandatory parameters are left unspecified; - *
2. Incorrect parameter types; 3. Parameter verification failed. * @throws { BusinessError } 14000011 - Internal system error * @syscap SystemCapability.FileManagement.PhotoAccessHelper.Core * @atomicservice -- Gitee