|
Apache OpenDALâ„¢ C Binding
The C binding for Apache OpenDALâ„¢
|
Options for stat operations. More...
#include <opendal.h>
Public Attributes | |
| const char * | version |
| const char * | if_match |
| const char * | if_none_match |
| bool | has_if_modified_since |
| int64_t | if_modified_since |
| bool | has_if_unmodified_since |
| int64_t | if_unmodified_since |
| const char * | override_content_type |
| const char * | override_cache_control |
| const char * | override_content_disposition |
Options for stat operations.
Each condition checks the file being observed, and every condition must hold for the stat to return metadata. With valid, supported options, stat returns OPENDAL_NOT_FOUND for a missing file. An existing file that fails a condition returns OPENDAL_CONDITION_NOT_MATCH, and a condition the service does not advertise through its capability returns OPENDAL_UNSUPPORTED; OpenDAL never silently drops a condition.
See the conditional operation specification for the complete cross-operation contract.
Use opendal_stat_options_new() to construct and opendal_stat_options_free() to free.
A caller that declares the struct itself must initialize every member, for example with opendal_stat_options opts = {0};, because a function that takes these options reads every member, also one whose has_* member is false.
| bool opendal_stat_options::has_if_modified_since |
Whether if_modified_since has been set.
| bool opendal_stat_options::has_if_unmodified_since |
Whether if_unmodified_since has been set.
| const char* opendal_stat_options::if_match |
Stat only when the file has this exact ETag.
The condition succeeds when the file exists and its ETag equals this value. A file with a different ETag returns OPENDAL_CONDITION_NOT_MATCH; a missing file returns OPENDAL_NOT_FOUND. Only concrete ETag values are portable; a wildcard such as "*" has no portable meaning here.
The operation returns OPENDAL_UNSUPPORTED when the service does not advertise opendal_capability.stat_with_if_match.
NULL means unset. A non-NULL value must point to a readable, nul-terminated UTF-8 string. opendal_stat_options_set_if_match() stores this pointer without copying the string, and opendal_stat_options_free() does not free it, so the string must stay valid until the function that takes these options returns.
| int64_t opendal_stat_options::if_modified_since |
Stat only when the file was modified after this timestamp.
The condition succeeds when the file exists and was modified after this time. A file not modified since this time returns OPENDAL_CONDITION_NOT_MATCH; a missing file returns OPENDAL_NOT_FOUND.
The operation returns OPENDAL_UNSUPPORTED when the service does not advertise opendal_capability.stat_with_if_modified_since.
Milliseconds since the Unix epoch. has_if_modified_since controls whether this value applies. When it applies, a value out of range fails the operation with OPENDAL_CONFIG_INVALID.
| const char* opendal_stat_options::if_none_match |
Stat only when the file does not have this ETag.
With a concrete ETag value, the condition succeeds when the file exists with a different ETag. A file whose ETag equals this value returns OPENDAL_CONDITION_NOT_MATCH; a missing file returns OPENDAL_NOT_FOUND. Only concrete ETag values are portable; a wildcard such as "*" has no portable meaning here.
The operation returns OPENDAL_UNSUPPORTED when the service does not advertise opendal_capability.stat_with_if_none_match.
NULL means unset. A non-NULL value must point to a readable, nul-terminated UTF-8 string. opendal_stat_options_set_if_none_match() stores this pointer without copying the string, and opendal_stat_options_free() does not free it, so the string must stay valid until the function that takes these options returns.
| int64_t opendal_stat_options::if_unmodified_since |
Stat only when the file was not modified after this timestamp.
The condition succeeds when the file exists and was not modified after this time. A file modified after this time returns OPENDAL_CONDITION_NOT_MATCH; a missing file returns OPENDAL_NOT_FOUND.
The operation returns OPENDAL_UNSUPPORTED when the service does not advertise opendal_capability.stat_with_if_unmodified_since.
Milliseconds since the Unix epoch. has_if_unmodified_since controls whether this value applies. When it applies, a value out of range fails the operation with OPENDAL_CONFIG_INVALID.
| const char* opendal_stat_options::override_cache_control |
Request a cache-control response header override from services that support it, including for presigned stat requests.
NULL means unset. A non-NULL value must point to a readable, nul-terminated UTF-8 string. opendal_stat_options_set_override_cache_control() stores this pointer without copying the string, and opendal_stat_options_free() does not free it, so the string must stay valid until the function that takes these options returns.
| const char* opendal_stat_options::override_content_disposition |
Request a content-disposition response header override from services that support it, including for presigned stat requests.
NULL means unset. A non-NULL value must point to a readable, nul-terminated UTF-8 string. opendal_stat_options_set_override_content_disposition() stores this pointer without copying the string, and opendal_stat_options_free() does not free it, so the string must stay valid until the function that takes these options returns.
| const char* opendal_stat_options::override_content_type |
Request a content-type response header override from services that support it, including for presigned stat requests.
NULL means unset. A non-NULL value must point to a readable, nul-terminated UTF-8 string. opendal_stat_options_set_override_content_type() stores this pointer without copying the string, and opendal_stat_options_free() does not free it, so the string must stay valid until the function that takes these options returns.
| const char* opendal_stat_options::version |
Stat the given version of the file instead of the current one.
This selects which stored version the stat describes; it is not a condition on the file. A version that does not exist returns OPENDAL_NOT_FOUND.
Check opendal_capability.stat_with_version before using this option.
NULL means unset. A non-NULL value must point to a readable, nul-terminated UTF-8 string. opendal_stat_options_set_version() stores this pointer without copying the string, and opendal_stat_options_free() does not free it, so the string must stay valid until the function that takes these options returns.