已开启
新增占位符文件判断接口文档 #159455
新增占位符文件判断接口文档 #159455
已开启
phybee创建于 8月6日
4 个文件变更+64-0
@@ -62,3 +62,8 @@ Enumerates the error codes of the cloud disk management module.
62| CLOUD_DISK_INVALID_CHANGE_SEQUENCE = 34400013 | The change sequence is invalid. You are advised to query all change sequences.|62| CLOUD_DISK_INVALID_CHANGE_SEQUENCE = 34400013 | The change sequence is invalid. You are advised to query all change sequences.|
63| CLOUD_DISK_TRY_AGAIN = 34400014 | Temporary failure (for example, due to high underlying I/O load or insufficient memory). Please try again.|63| CLOUD_DISK_TRY_AGAIN = 34400014 | Temporary failure (for example, due to high underlying I/O load or insufficient memory). Please try again.|
64| CLOUD_DISK_NOT_ALLOWED = 34400015 | This feature is not allowed on the current device.|64| CLOUD_DISK_NOT_ALLOWED = 34400015 | This feature is not allowed on the current device.|
65+| OH_CLOUD_DISK_FILE_ALREADY_EXISTS = 34400016 | A file with the same name already exists in the target path.|
66+| OH_CLOUD_DISK_NO_SPACE_LEFT = 34400020 | No space is left on the device.|
67+| OH_CLOUD_DISK_NOT_A_DIRECTORY = 34400023 | The parent path of the target path is not a directory.|
68+| OH_CLOUD_DISK_FILE_NOT_EXIST = 34400024 | The target path does not exist.|
69+| OH_CLOUD_DISK_NAME_TOO_LONG = 34400025 | The target file name is too long.|
@@ -59,6 +59,7 @@ This file defines the APIs for the cloud disk management module.
59| [CloudDisk_ErrorCode OH_CloudDisk_DeactiveSyncFolder(const CloudDisk_SyncFolderPath syncFolderPath)](#oh_clouddisk_deactivesyncfolder) | Deactivates the sync root.|59| [CloudDisk_ErrorCode OH_CloudDisk_DeactiveSyncFolder(const CloudDisk_SyncFolderPath syncFolderPath)](#oh_clouddisk_deactivesyncfolder) | Deactivates the sync root.|
60| [CloudDisk_ErrorCode OH_CloudDisk_GetSyncFolders(CloudDisk_SyncFolder **syncFolders, size_t *count)](#oh_clouddisk_getsyncfolders) | Obtains all sync roots.|60| [CloudDisk_ErrorCode OH_CloudDisk_GetSyncFolders(CloudDisk_SyncFolder **syncFolders, size_t *count)](#oh_clouddisk_getsyncfolders) | Obtains all sync roots.|
61| [CloudDisk_ErrorCode OH_CloudDisk_UpdateCustomAlias(const CloudDisk_SyncFolderPath syncFolderPath, const char *customAlias, size_t customAliasLength)](#oh_clouddisk_updatecustomalias) | Updates the sync root alias.|61| [CloudDisk_ErrorCode OH_CloudDisk_UpdateCustomAlias(const CloudDisk_SyncFolderPath syncFolderPath, const char *customAlias, size_t customAliasLength)](#oh_clouddisk_updatecustomalias) | Updates the sync root alias.|
62+| [CloudDisk_ErrorCode OH_CloudDisk_IsPlaceholderFile(const CloudDisk_SyncFolderPath syncFolderPath, const CloudDisk_PathInfo path, bool *isPlaceholder)](#oh_clouddisk_isplaceholderfile) | Checks whether a file in a sync root path is a placeholder file.|
62 63 
63## Enum Description64## Enum Description
64 65 
@@ -422,3 +423,29 @@ Updates the sync root alias.
422| Type| Description|423| Type| Description|
423| -- | -- |424| -- | -- |
424| [CloudDisk_ErrorCode](capi-cloud-disk-error-code-h.md#clouddisk_errorcode) | Returns [CLOUD_DISK_OK](capi-cloud-disk-error-code-h.md#clouddisk_errorcode) if the API is called successfully; returns [CloudDisk_ErrorCode](capi-cloud-disk-error-code-h.md#clouddisk_errorcode) otherwise.|425| [CloudDisk_ErrorCode](capi-cloud-disk-error-code-h.md#clouddisk_errorcode) | Returns [CLOUD_DISK_OK](capi-cloud-disk-error-code-h.md#clouddisk_errorcode) if the API is called successfully; returns [CloudDisk_ErrorCode](capi-cloud-disk-error-code-h.md#clouddisk_errorcode) otherwise.|
426+ 
427+### OH_CloudDisk_IsPlaceholderFile()
428+ 
429+```c
430+CloudDisk_ErrorCode OH_CloudDisk_IsPlaceholderFile(const CloudDisk_SyncFolderPath syncFolderPath, const CloudDisk_PathInfo path, bool *isPlaceholder)
431+```
432+ 
433+**Description**
434+ 
435+Checks whether a specified file in a sync root path is a placeholder file.
436+ 
437+**Since**: 26.1.0
438+ 
439+**Parameters**
440+ 
441+| Name| Description|
442+| -- | -- |
443+| const CloudDisk_SyncFolderPath syncFolderPath | Registered sync root path. For details, see [CloudDisk_PathInfo](capi-clouddisk-clouddisk-pathinfo.md).|
444+| const CloudDisk_PathInfo path | Relative path of the file to check in the sync root path. For details, see [CloudDisk_PathInfo](capi-clouddisk-clouddisk-pathinfo.md).|
445+| bool *isPlaceholder | Output parameter. This parameter is valid only when [CLOUD_DISK_OK](capi-cloud-disk-error-code-h.md#clouddisk_errorcode) is returned. The value **true** indicates that the file is a placeholder file; **false** indicates the opposite. If the API call fails, this value is set to **false**.|
446+ 
447+**Returns**
448+ 
449+| Type| Description|
450+| -- | -- |
451+| [CloudDisk_ErrorCode](capi-cloud-disk-error-code-h.md#clouddisk_errorcode) | Returns [CLOUD_DISK_OK](capi-cloud-disk-error-code-h.md#clouddisk_errorcode) if the API is called successfully; returns [CloudDisk_ErrorCode](capi-cloud-disk-error-code-h.md#clouddisk_errorcode) otherwise.|
@@ -62,5 +62,10 @@ enum CloudDisk_ErrorCode
62| CLOUD_DISK_INVALID_CHANGE_SEQUENCE = 34400013 | 变更序列号无效或已过期,建议重新查询所有变更记录。 | 请重新发起全量变更查询。 |62| CLOUD_DISK_INVALID_CHANGE_SEQUENCE = 34400013 | 变更序列号无效或已过期,建议重新查询所有变更记录。 | 请重新发起全量变更查询。 |
63| CLOUD_DISK_TRY_AGAIN = 34400014 | 临时失败,建议重试(如:底层I/O负载过大、内存不足等)。 | 请稍后重试。 |63| CLOUD_DISK_TRY_AGAIN = 34400014 | 临时失败,建议重试(如:底层I/O负载过大、内存不足等)。 | 请稍后重试。 |
64| CLOUD_DISK_NOT_ALLOWED = 34400015 | 当前设备不允许执行此功能。 | 请检查设备是否满足功能要求,如系统版本、硬件配置等。 |64| CLOUD_DISK_NOT_ALLOWED = 34400015 | 当前设备不允许执行此功能。 | 请检查设备是否满足功能要求,如系统版本、硬件配置等。 |
65+| OH_CLOUD_DISK_FILE_ALREADY_EXISTS = 34400016 | 目标路径下已存在同名文件。 | 请检查目标路径是否已存在同名文件,调整文件名或路径后重试。 |
66+| OH_CLOUD_DISK_NO_SPACE_LEFT = 34400020 | 设备剩余空间不足。 | 请释放设备存储空间后重试。 |
67+| OH_CLOUD_DISK_NOT_A_DIRECTORY = 34400023 | 目标路径的父路径不是目录。 | 请检查目标路径的父路径是否为有效目录。 |
68+| OH_CLOUD_DISK_FILE_NOT_EXIST = 34400024 | 目标路径不存在。 | 请检查目标路径是否正确,或先创建该路径。 |
69+| OH_CLOUD_DISK_NAME_TOO_LONG = 34400025 | 目标文件名过长。 | 请缩短文件名后重试。 |
65 70 
66 71 
@@ -59,6 +59,7 @@
59| [CloudDisk_ErrorCode OH_CloudDisk_DeactiveSyncFolder(const CloudDisk_SyncFolderPath syncFolderPath)](#oh_clouddisk_deactivesyncfolder) | 应用取消激活同步根。 |59| [CloudDisk_ErrorCode OH_CloudDisk_DeactiveSyncFolder(const CloudDisk_SyncFolderPath syncFolderPath)](#oh_clouddisk_deactivesyncfolder) | 应用取消激活同步根。 |
60| [CloudDisk_ErrorCode OH_CloudDisk_GetSyncFolders(CloudDisk_SyncFolder **syncFolders, size_t *count)](#oh_clouddisk_getsyncfolders) | 应用获取所有同步根。 |60| [CloudDisk_ErrorCode OH_CloudDisk_GetSyncFolders(CloudDisk_SyncFolder **syncFolders, size_t *count)](#oh_clouddisk_getsyncfolders) | 应用获取所有同步根。 |
61| [CloudDisk_ErrorCode OH_CloudDisk_UpdateCustomAlias(const CloudDisk_SyncFolderPath syncFolderPath, const char *customAlias, size_t customAliasLength)](#oh_clouddisk_updatecustomalias) | 应用更新同步根别名。 |61| [CloudDisk_ErrorCode OH_CloudDisk_UpdateCustomAlias(const CloudDisk_SyncFolderPath syncFolderPath, const char *customAlias, size_t customAliasLength)](#oh_clouddisk_updatecustomalias) | 应用更新同步根别名。 |
62+| [CloudDisk_ErrorCode OH_CloudDisk_IsPlaceholderFile(const CloudDisk_SyncFolderPath syncFolderPath, const CloudDisk_PathInfo path, bool *isPlaceholder)](#oh_clouddisk_isplaceholderfile) | 检查同步根路径下的文件是否为占位符文件。 |
62 63 
63## 枚举类型说明64## 枚举类型说明
64 65 
@@ -423,4 +424,30 @@ CloudDisk_ErrorCode OH_CloudDisk_UpdateCustomAlias(const CloudDisk_SyncFolderPat
423| -- | -- |424| -- | -- |
424| [CloudDisk_ErrorCode](capi-cloud-disk-error-code-h.md#clouddisk_errorcode) | 如果接口调用成功,返回[CLOUD_DISK_OK](capi-cloud-disk-error-code-h.md#clouddisk_errorcode);否则返回云盘管理模块的错误码[CloudDisk_ErrorCode](capi-cloud-disk-error-code-h.md#clouddisk_errorcode)。 |425| [CloudDisk_ErrorCode](capi-cloud-disk-error-code-h.md#clouddisk_errorcode) | 如果接口调用成功,返回[CLOUD_DISK_OK](capi-cloud-disk-error-code-h.md#clouddisk_errorcode);否则返回云盘管理模块的错误码[CloudDisk_ErrorCode](capi-cloud-disk-error-code-h.md#clouddisk_errorcode)。 |
425 426 
427+### OH_CloudDisk_IsPlaceholderFile()
428+ 
429+```c
430+CloudDisk_ErrorCode OH_CloudDisk_IsPlaceholderFile(const CloudDisk_SyncFolderPath syncFolderPath, const CloudDisk_PathInfo path, bool *isPlaceholder)
431+```
432+ 
433+**描述**
434+ 
435+检查同步根路径下的指定文件是否为占位符文件。
436+ 
437+**起始版本:** 26.1.0
438+ 
439+**参数:**
440+ 
441+| 参数项 | 描述 |
442+| -- | -- |
443+| const CloudDisk_SyncFolderPath syncFolderPath | 已注册的同步根路径,参考:[CloudDisk_PathInfo](capi-clouddisk-clouddisk-pathinfo.md)。 |
444+| const CloudDisk_PathInfo path | 同步根路径下待检查文件的相对路径,参考:[CloudDisk_PathInfo](capi-clouddisk-clouddisk-pathinfo.md)。 |
445+| bool *isPlaceholder | 输出参数。返回值为[CLOUD_DISK_OK](capi-cloud-disk-error-code-h.md#clouddisk_errorcode)时该参数有效。true表示该文件是占位符文件;false表示该文件不是占位符文件。接口调用失败时,该值被设置为false。 |
446+ 
447+**返回:**
448+ 
449+| 类型 | 说明 |
450+| -- | -- |
451+| [CloudDisk_ErrorCode](capi-cloud-disk-error-code-h.md#clouddisk_errorcode) | 如果接口调用成功,返回[CLOUD_DISK_OK](capi-cloud-disk-error-code-h.md#clouddisk_errorcode);否则返回云盘管理模块的错误码[CloudDisk_ErrorCode](capi-cloud-disk-error-code-h.md#clouddisk_errorcode)。 |
452+ 
426 453