|
Apache OpenDALâ„¢ C Binding
The C binding for Apache OpenDALâ„¢
|
Options for delete operations. More...
#include <opendal.h>
Public Attributes | |
| char * | version |
| bool | recursive |
Options for delete operations.
C exposes only version and recursive, and neither is a condition, so the conditions below cannot be used from C yet. Selecting a version with version fails with OPENDAL_UNSUPPORTED when opendal_capability.delete_with_version is false, even if the path is missing.
Each condition checks the file currently stored at the delete path, and every condition must hold for the delete to proceed:
With valid, supported options, deleting a missing file remains a successful no-op once every condition holds.
See the conditional operation specification for the complete cross-operation contract.
Use opendal_delete_options_new() to construct and opendal_delete_options_free() to free.
A caller that declares the struct itself must initialize every member, for example with opendal_delete_options opts = {0};, because a function that takes these options reads every member.
| bool opendal_delete_options::recursive |
Whether to delete the target recursively.
The default, false, deletes a single object. With true, a trailing slash (for example, "a/") scopes deletion to a directory and its descendants across services. Prefix matching for paths without a trailing slash is service-specific. On prefix-based services such as memory, "a" also matches entries under "ab/".
With true, the operation returns OPENDAL_UNSUPPORTED when the service does not advertise opendal_capability.delete_with_recursive.
| char* opendal_delete_options::version |
Delete the given version of the file instead of the current one.
This selects which stored version the delete removes; it is not a condition on the file.
Check opendal_capability.delete_with_version before using this option.
NULL means unset. opendal_delete_options_set_version() stores a copy of the string, and opendal_delete_options_free() frees it.