From a192099f1ddfea0268e298c62b50e28579a209ff Mon Sep 17 00:00:00 2001 From: Fouckttt Date: Tue, 29 Jul 2025 17:24:31 +0800 Subject: [PATCH] JSDoc test Issue:https://gitee.com/openharmony/interface_sdk-js/issues/ICPLBY Signed-off-by: Fouckttt --- api/@ohos.file.cloudSync.d.ts | 75 ++++++++++++++++++++++++++++++++--- 1 file changed, 69 insertions(+), 6 deletions(-) diff --git a/api/@ohos.file.cloudSync.d.ts b/api/@ohos.file.cloudSync.d.ts index 04e7c17c0f..817001afeb 100644 --- a/api/@ohos.file.cloudSync.d.ts +++ b/api/@ohos.file.cloudSync.d.ts @@ -983,8 +983,7 @@ declare namespace cloudSync { * @throws { BusinessError } 14000002 - Invalid URI. * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSync.Core * @systemapi - * @since arkts{ '1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ function getFileSyncState(uri: Array): Promise>; /** @@ -1002,8 +1001,7 @@ declare namespace cloudSync { * @throws { BusinessError } 14000002 - Invalid URI. * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSync.Core * @systemapi - * @since arkts{ '1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ function getFileSyncState(uri: Array, callback: AsyncCallback>): void; /** @@ -1023,10 +1021,75 @@ declare namespace cloudSync { * @throws { BusinessError } 14000002 - Invalid URI. * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSync.Core * @systemapi - * @since arkts{ '1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ function getFileSyncState(uri: string): FileSyncState; + + /** + * @since 20 + * @arkts 1.2 + */ + export overload getFileSyncState { getFileSyncStateReturnsPromise, getFileSyncStateWithCallback, getFileSyncStateWithUri } + + /** + * Get the sync state of file. + * + * @permission ohos.permission.CLOUDFILE_SYNC + * @param { Array } uri - uri of files. + * @returns { Promise> } - Return the sync state of given files. + * @throws { BusinessError } 201 - Permission verification failed, usually the result returned by VerifyAccessToken. + * @throws { BusinessError } 202 - Permission verification failed, application which is not a system application uses system API. + * @throws { BusinessError } 401 - The input parameter is invalid.Possible causes:1.Mandatory parameters are left unspecified; + *
2.Incorrect parameter types. + * @throws { BusinessError } 13600001 - IPC error. + * @throws { BusinessError } 13900002 - No such file or directory. + * @throws { BusinessError } 14000002 - Invalid URI. + * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSync.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + function getFileSyncStateReturnsPromise(uri: Array): Promise>; + /** + * Get the sync state of file. + * + * @permission ohos.permission.CLOUDFILE_SYNC + * @param { Array } uri - uri of file. + * @param { AsyncCallback> } callback - The callback is used to return the sync state of given files. + * @throws { BusinessError } 201 - Permission verification failed, usually the result returned by VerifyAccessToken. + * @throws { BusinessError } 202 - Permission verification failed, application which is not a system application uses system API. + * @throws { BusinessError } 401 - The input parameter is invalid.Possible causes:1.Mandatory parameters are left unspecified; + *
2.Incorrect parameter types. + * @throws { BusinessError } 13600001 - IPC error. + * @throws { BusinessError } 13900002 - No such file or directory. + * @throws { BusinessError } 14000002 - Invalid URI. + * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSync.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + function getFileSyncStateWithCallback(uri: Array, callback: AsyncCallback>): void; + /** + * Get the sync state of file. + * + * @param { string } uri - uri of file. + * @returns { FileSyncState } - return the sync state of given files. + * @throws { BusinessError } 202 - Permission verification failed, application which is not a system application uses system API. + * @throws { BusinessError } 401 - The input parameter is invalid.Possible causes:1.Mandatory parameters are left unspecified; + *
2.Incorrect parameter types. + * @throws { BusinessError } 13900002 - No such file or directory. + * @throws { BusinessError } 13900004 - Interrupted system call + * @throws { BusinessError } 13900010 - Try again + * @throws { BusinessError } 13900012 - Permission denied by the file system + * @throws { BusinessError } 13900031 - Function not implemented + * @throws { BusinessError } 13900042 - Unknown error + * @throws { BusinessError } 14000002 - Invalid URI. + * @syscap SystemCapability.FileManagement.DistributedFileService.CloudSync.Core + * @systemapi + * @since 20 + * @arkts 1.2 + */ + function getFileSyncStateWithUri(uri: string): FileSyncState; /** * Register change notify for the specified uri. * -- Gitee