30#define OPENDAL_SEEK_SET 0
35#define OPENDAL_SEEK_CUR 1
40#define OPENDAL_SEEK_END 2
239 const char *message);
2279 uint64_t min_delay_ns,
2280 uint64_t max_delay_ns,
2281 uint64_t max_times);
2287 uint64_t timeout_ns,
2288 uint64_t io_timeout_ns);
3763 uint64_t expire_secs,
3783 uint64_t expire_secs,
3803 uint64_t expire_secs,
3818 uint64_t expire_secs,
3841 uint64_t expire_secs,
3864 uint64_t expire_secs,
3879 uint64_t expire_secs,
3899 uint64_t expire_secs,
3919 uint64_t expire_secs,
3934 uint64_t expire_secs,
3954 uint64_t expire_secs,
3974 uint64_t expire_secs,
5656 const char *
const *paths,
5657 uintptr_t paths_len);
5670 const char *
const *paths,
5671 uintptr_t paths_len,
struct opendal_error * opendal_operator_write(const struct opendal_operator *op, const char *path, const struct opendal_bytes *bytes)
Blocking write raw bytes to path.
struct opendal_delete_options * opendal_delete_options_new(void)
Construct a heap-allocated opendal_delete_options with default values.
char * opendal_operator_info_get_name(const struct opendal_operator_info *self)
Return the nul-terminated operator backend's name, could be empty if underlying backend has no namesp...
void opendal_read_options_set_content_length_hint(struct opendal_read_options *opts, uint64_t content_length_hint)
Set content_length_hint.
void opendal_reader_options_set_chunk(struct opendal_reader_options *opts, uintptr_t chunk)
Set chunk.
void opendal_operator_layers_add_retry(struct opendal_operator_layers *layers, bool jitter, float factor, uint64_t min_delay_ns, uint64_t max_delay_ns, uint64_t max_times)
Add a retry layer.
struct opendal_error * opendal_operator_presign_read_with_cancel(const struct opendal_operator *op, const char *path, uint64_t expire_secs, const struct opendal_read_options *opts, const struct opendal_cancel_token *cancel, struct opendal_presigned_request **req)
Presign a read operation with options and optional cancellation.
void opendal_write_options_set_if_match(struct opendal_write_options *opts, const char *if_match)
Set if_match.
void opendal_operator_free(const struct opendal_operator *ptr)
Free the heap-allocated operator pointed by opendal_operator.
void opendal_write_options_free(struct opendal_write_options *opts)
Free the heap memory used by opendal_write_options.
void opendal_metadata_user_metadata_free(struct opendal_metadata_user_metadata *metadata)
Free the user metadata returned by opendal_metadata_user_metadata.
struct opendal_error * opendal_operator_deleter(const struct opendal_operator *op, struct opendal_deleter **deleter_out)
Create a blocking deleter to remove multiple paths.
void opendal_stat_options_set_if_modified_since(struct opendal_stat_options *opts, int64_t if_modified_since)
Set if_modified_since.
void opendal_stat_options_set_if_none_match(struct opendal_stat_options *opts, const char *if_none_match)
Set if_none_match.
struct opendal_error * opendal_operator_presign_read_with(const struct opendal_operator *op, const char *path, uint64_t expire_secs, const struct opendal_read_options *opts, struct opendal_presigned_request **req)
Presign a read operation with options.
struct opendal_error * opendal_copier_next(struct opendal_copier *self, uintptr_t *size, bool *has_next)
Perform one step of the copy operation.
struct opendal_error * opendal_operator_exists_with_cancel(const struct opendal_operator *op, const char *path, const struct opendal_cancel_token *cancel, bool *exists)
Check whether the path exists, supporting optional cancellation via cancel.
void opendal_read_options_set_range_from(struct opendal_read_options *opts, uint64_t offset)
Set the range to start at offset and continue to the end of the file.
void opendal_read_options_set_if_match(struct opendal_read_options *opts, const char *if_match)
Set if_match.
struct opendal_error * opendal_operator_copier_with(const struct opendal_operator *op, const char *src, const char *dest, const struct opendal_copy_options *opts, struct opendal_copier **copier)
Blocking create a copier to copy a file from src to dest with options.
struct opendal_error * opendal_operator_list(const struct opendal_operator *op, const char *path, struct opendal_lister **lister)
Blocking list the objects in path.
struct opendal_error * opendal_reader_read_with_cancel(struct opendal_reader *self, uint8_t *buf, uintptr_t len, const struct opendal_cancel_token *cancel, uintptr_t *size)
Read data from the reader into buf, supporting cancellation via cancel.
uint8_t opendal_metadata_mode(const struct opendal_metadata *self)
Return this entry's mode.
struct opendal_operator_layers * opendal_operator_layers_new(void)
Construct a heap-allocated opendal_operator_layers.
void opendal_copy_options_set_if_not_exists(struct opendal_copy_options *opts, bool if_not_exists)
Set if_not_exists.
void opendal_reader_options_set_version(struct opendal_reader_options *opts, const char *version)
Set version.
struct opendal_error * opendal_operator_create_dir(const struct opendal_operator *op, const char *path)
Blocking create the directory in path.
void opendal_list_options_free(struct opendal_list_options *opts)
Free the heap memory used by opendal_list_options.
char * opendal_metadata_content_md5(const struct opendal_metadata *self)
Return this entry's Content-MD5 value.
const char * opendal_c_version(void)
void opendal_copier_free(struct opendal_copier *ptr)
Free the heap memory used by the opendal_copier.
struct opendal_error * opendal_operator_copy_with_cancel(const struct opendal_operator *op, const char *src, const char *dest, const struct opendal_copy_options *opts, const struct opendal_cancel_token *cancel)
Blocking copy the object from src to dest with options and optional cancellation.
char * opendal_metadata_content_encoding(const struct opendal_metadata *self)
Return this entry's Content-Encoding value.
struct opendal_error * opendal_deleter_flush(struct opendal_deleter *self)
Complete pending deletions and keep the deleter usable.
void opendal_delete_options_set_version(struct opendal_delete_options *opts, const char *version)
Set version.
uintptr_t opendal_metadata_user_metadata_len(const struct opendal_metadata_user_metadata *metadata)
Return the number of key-value pairs in the user metadata.
char * opendal_metadata_cache_control(const struct opendal_metadata *self)
Return this entry's Cache-Control value.
struct opendal_error * opendal_operator_read_with(const struct opendal_operator *op, const char *path, const struct opendal_read_options *opts, struct opendal_bytes *bytes)
Blocking read the data from path with options.
struct opendal_error * opendal_copier_abort(struct opendal_copier *self)
Abort the pending copy operation.
void opendal_copy_options_set_if_match(struct opendal_copy_options *opts, const char *if_match)
Set if_match.
struct opendal_error * opendal_writer_write_with_cancel(struct opendal_writer *self, const struct opendal_bytes *bytes, const struct opendal_cancel_token *cancel, uintptr_t *size)
Write data to the writer, supporting cancellation via cancel.
void opendal_operator_info_get_capability(const struct opendal_operator_info *self, struct opendal_capability *cap)
Write the operator's capability into cap.
struct opendal_error * opendal_operator_delete_with_cancel(const struct opendal_operator *op, const char *path, const struct opendal_delete_options *opts, const struct opendal_cancel_token *cancel)
Blocking delete the object in path with options and optional cancellation.
struct opendal_error * opendal_operator_reader_with(const struct opendal_operator *op, const char *path, const struct opendal_reader_options *opts, struct opendal_reader **reader)
Blocking create a reader for the specified path with options.
void opendal_operator_layers_add_timeout(struct opendal_operator_layers *layers, uint64_t timeout_ns, uint64_t io_timeout_ns)
Add a timeout layer.
void opendal_stat_options_set_override_content_disposition(struct opendal_stat_options *opts, const char *override_content_disposition)
Set override_content_disposition.
struct opendal_error * opendal_operator_list_with_cancel(const struct opendal_operator *op, const char *path, const struct opendal_list_options *opts, const struct opendal_cancel_token *cancel, struct opendal_lister **lister)
Blocking list the objects in path with options and optional cancellation.
struct opendal_error * opendal_writer_close_with_metadata(struct opendal_writer *ptr, struct opendal_metadata **meta)
Close the writer and write the written object's metadata to *meta.
struct opendal_error * opendal_operator_write_with_metadata(const struct opendal_operator *op, const char *path, const struct opendal_bytes *bytes, const struct opendal_write_options *opts, struct opendal_metadata **meta)
Blocking write raw bytes to path, returning the written object's metadata.
struct opendal_error * opendal_operator_writer_with(const struct opendal_operator *op, const char *path, const struct opendal_write_options *opts, struct opendal_writer **writer)
Blocking create a writer for the specified path with options.
void opendal_delete_options_free(struct opendal_delete_options *opts)
Free the heap memory used by opendal_delete_options.
void opendal_list_options_set_recursive(struct opendal_list_options *opts, bool recursive)
Set recursive.
void opendal_stat_options_set_version(struct opendal_stat_options *opts, const char *version)
Set version.
struct opendal_error * opendal_operator_reader_with_cancel(const struct opendal_operator *op, const char *path, const struct opendal_reader_options *opts, const struct opendal_cancel_token *cancel, struct opendal_reader **reader)
Blocking create a reader for the specified path with options and optional cancellation.
void opendal_copy_options_set_source_content_length_hint(struct opendal_copy_options *opts, uint64_t source_content_length_hint)
Set source_content_length_hint.
uintptr_t opendal_presigned_request_headers_len(const struct opendal_presigned_request *req)
char * opendal_operator_info_get_scheme(const struct opendal_operator_info *self)
Return the nul-terminated operator's scheme, i.e. service.
void opendal_read_options_set_version(struct opendal_read_options *opts, const char *version)
Set version.
struct opendal_error * opendal_operator_write_with(const struct opendal_operator *op, const char *path, const struct opendal_bytes *bytes, const struct opendal_write_options *opts)
Blocking write raw bytes to path with options.
struct opendal_error * opendal_operator_writer_with_cancel(const struct opendal_operator *op, const char *path, const struct opendal_write_options *opts, const struct opendal_cancel_token *cancel, struct opendal_writer **writer)
Blocking create a writer for the specified path with options and optional cancellation.
struct opendal_error * opendal_operator_new(const char *scheme, const struct opendal_operator_options *options, struct opendal_operator **op)
Construct an operator based on scheme and options.
struct opendal_error * opendal_operator_copy_with(const struct opendal_operator *op, const char *src, const char *dest, const struct opendal_copy_options *opts)
Blocking copy the object in path with options.
void opendal_cancel_token_free(struct opendal_cancel_token *token)
Free the heap memory used by opendal_cancel_token.
void opendal_error_free(struct opendal_error *ptr)
Frees the opendal_error, ok to call on NULL.
void opendal_operator_info_free(struct opendal_operator_info *ptr)
Free the heap-allocated opendal_operator_info.
char * opendal_metadata_content_disposition(const struct opendal_metadata *self)
Return this entry's Content-Disposition value.
struct opendal_error * opendal_operator_presign_write_with(const struct opendal_operator *op, const char *path, uint64_t expire_secs, const struct opendal_write_options *opts, struct opendal_presigned_request **req)
Presign a write operation with options.
struct opendal_read_options * opendal_read_options_new(void)
Construct a heap-allocated opendal_read_options with default values.
char * opendal_metadata_version(const struct opendal_metadata *self)
Return this entry's service-specific version identifier.
void opendal_list_options_set_limit(struct opendal_list_options *opts, uintptr_t limit)
Set limit.
char * opendal_metadata_etag(const struct opendal_metadata *self)
Return this entry's service-provided ETag as-is.
struct opendal_error * opendal_operator_copier(const struct opendal_operator *op, const char *src, const char *dest, struct opendal_copier **copier)
Blocking create a copier to copy a file from src to dest.
void opendal_read_options_set_if_none_match(struct opendal_read_options *opts, const char *if_none_match)
Set if_none_match.
bool opendal_cancel_token_is_cancelled(const struct opendal_cancel_token *token)
Return whether token has been cancelled.
struct opendal_error * opendal_copier_next_with_cancel(struct opendal_copier *self, const struct opendal_cancel_token *cancel, uintptr_t *size, bool *has_next)
Perform one step of the copy operation, supporting cancellation via cancel.
struct opendal_error * opendal_operator_new_with_layers(const char *scheme, const struct opendal_operator_options *options, const struct opendal_operator_layers *layers, struct opendal_operator **op)
Construct an operator based on scheme, options, and explicit layers.
void opendal_write_options_set_content_disposition(struct opendal_write_options *opts, const char *content_disposition)
Set content_disposition.
void opendal_stat_options_set_if_match(struct opendal_stat_options *opts, const char *if_match)
Set if_match.
struct opendal_error * opendal_operator_copy(const struct opendal_operator *op, const char *src, const char *dest)
Blocking copy the object in path.
struct opendal_error * opendal_logging_init(opendal_log_callback callback)
Installs one process-global native callback for the library's Rust log facade.
void opendal_string_free(char *ptr)
Frees a heap-allocated string returned by OpenDAL C APIs.
void opendal_write_options_set_chunk(struct opendal_write_options *opts, uintptr_t chunk)
Set chunk.
struct opendal_error * opendal_operator_presign_write(const struct opendal_operator *op, const char *path, uint64_t expire_secs, struct opendal_presigned_request **req)
Presign a write operation.
opendal_code
The error code for all opendal APIs in C binding.
Definition opendal.h:47
@ OPENDAL_CONDITION_NOT_MATCH
Definition opendal.h:91
@ OPENDAL_UNSUPPORTED
Definition opendal.h:55
@ OPENDAL_CHECKSUM_MISMATCH
Definition opendal.h:107
@ OPENDAL_NOT_FOUND
Definition opendal.h:63
@ OPENDAL_CANCELLED
Definition opendal.h:103
@ OPENDAL_IS_A_DIRECTORY
Definition opendal.h:71
@ OPENDAL_UNEXPECTED
Definition opendal.h:51
@ OPENDAL_PERMISSION_DENIED
Definition opendal.h:67
@ OPENDAL_ALREADY_EXISTS
Definition opendal.h:79
@ OPENDAL_IS_SAME_FILE
Definition opendal.h:87
@ OPENDAL_RANGE_NOT_SATISFIED
Definition opendal.h:95
@ OPENDAL_NOT_A_DIRECTORY
Definition opendal.h:75
@ OPENDAL_CONFLICT
Definition opendal.h:99
@ OPENDAL_RATE_LIMITED
Definition opendal.h:83
@ OPENDAL_CONFIG_INVALID
Definition opendal.h:59
struct opendal_error * opendal_operator_presign_stat_with(const struct opendal_operator *op, const char *path, uint64_t expire_secs, const struct opendal_stat_options *opts, struct opendal_presigned_request **req)
Presign a stat operation with options.
void opendal_list_options_set_deleted(struct opendal_list_options *opts, bool deleted)
Set deleted.
struct opendal_error * opendal_writer_close(struct opendal_writer *ptr)
Close the writer and make sure all data have been stored.
void opendal_operator_layers_free(struct opendal_operator_layers *ptr)
Free the allocated memory used by opendal_operator_layers.
struct opendal_write_options * opendal_write_options_new(void)
Construct a heap-allocated opendal_write_options with default values.
struct opendal_error * opendal_operator_is_exist(const struct opendal_operator *op, const char *path, bool *is_exist)
Check whether the path exists.
void opendal_stat_options_free(struct opendal_stat_options *opts)
Free the heap memory used by opendal_stat_options.
uint8_t opendal_metadata_is_current(const struct opendal_metadata *self)
Return whether this metadata describes the current object version.
struct opendal_reader_options * opendal_reader_options_new(void)
Construct a heap-allocated opendal_reader_options with default values.
struct opendal_error * opendal_deleter_delete_many(struct opendal_deleter *self, const char *const *paths, uintptr_t paths_len)
Submit multiple paths for deletion in one call.
struct opendal_error * opendal_operator_read(const struct opendal_operator *op, const char *path, struct opendal_bytes *bytes)
Blocking read the data from path.
void opendal_lister_free(struct opendal_lister *ptr)
Free the heap-allocated metadata used by opendal_lister.
const struct opendal_metadata_user_metadata_pair * opendal_metadata_user_metadata_pairs(const struct opendal_metadata_user_metadata *metadata)
Return the key-value pairs of the user metadata.
struct opendal_error * opendal_deleter_delete_with(struct opendal_deleter *self, const char *path, const struct opendal_delete_options *opts)
Submit path for deletion with per-path options.
void opendal_reader_options_set_if_unmodified_since(struct opendal_reader_options *opts, int64_t if_unmodified_since)
Set if_unmodified_since.
void opendal_read_options_set_gap(struct opendal_read_options *opts, uintptr_t gap)
Set gap.
char * opendal_entry_name(const struct opendal_entry *self)
Name of entry.
void opendal_reader_free(struct opendal_reader *ptr)
Frees the heap memory used by the opendal_reader.
void opendal_read_options_set_concurrent(struct opendal_read_options *opts, uintptr_t concurrent)
Set concurrent.
void opendal_copy_options_set_source_version(struct opendal_copy_options *opts, const char *source_version)
Set source_version.
void opendal_delete_options_set_recursive(struct opendal_delete_options *opts, bool recursive)
Set recursive.
void opendal_operator_options_free(struct opendal_operator_options *ptr)
Free the allocated memory used by [opendal_operator_options].
bool opendal_metadata_is_file(const struct opendal_metadata *self)
Return whether the path represents a file.
void opendal_read_options_set_if_modified_since(struct opendal_read_options *opts, int64_t if_modified_since)
Set if_modified_since.
struct opendal_error * opendal_operator_delete_with(const struct opendal_operator *op, const char *path, const struct opendal_delete_options *opts)
Blocking delete the object in path with options.
void opendal_reader_options_set_if_modified_since(struct opendal_reader_options *opts, int64_t if_modified_since)
Set if_modified_since.
uintptr_t opendal_c_capability_size(void)
void opendal_read_options_set_if_unmodified_since(struct opendal_read_options *opts, int64_t if_unmodified_since)
Set if_unmodified_since.
struct opendal_error * opendal_lister_next_with_cancel(struct opendal_lister *self, const struct opendal_cancel_token *cancel, struct opendal_entry **entry)
Return the next object to be listed, supporting cancellation via cancel.
void opendal_reader_options_set_content_length_hint(struct opendal_reader_options *opts, uint64_t content_length_hint)
Set content_length_hint.
void opendal_metadata_free(struct opendal_metadata *ptr)
Free the heap-allocated metadata used by opendal_metadata.
void opendal_write_options_set_content_type(struct opendal_write_options *opts, const char *content_type)
Set content_type.
struct opendal_error * opendal_operator_presign_delete(const struct opendal_operator *op, const char *path, uint64_t expire_secs, struct opendal_presigned_request **req)
Presign a delete operation.
void opendal_stat_options_set_if_unmodified_since(struct opendal_stat_options *opts, int64_t if_unmodified_since)
Set if_unmodified_since.
void opendal_copy_options_set_concurrent(struct opendal_copy_options *opts, uintptr_t concurrent)
Set concurrent.
struct opendal_error * opendal_operator_copier_with_cancel(const struct opendal_operator *op, const char *src, const char *dest, const struct opendal_copy_options *opts, const struct opendal_cancel_token *cancel, struct opendal_copier **copier)
Blocking create a copier to copy a file from src to dest with options and optional cancellation.
struct opendal_error * opendal_writer_write(struct opendal_writer *self, const struct opendal_bytes *bytes, uintptr_t *size)
Write data to the writer and write the number of bytes written to *size.
void opendal_write_options_set_if_not_exists(struct opendal_write_options *opts, bool if_not_exists)
Set if_not_exists.
struct opendal_error * opendal_writer_close_with_cancel(struct opendal_writer *ptr, const struct opendal_cancel_token *cancel, struct opendal_metadata **meta)
Close the writer, supporting cancellation via cancel and optional metadata output.
char * opendal_metadata_content_language(const struct opendal_metadata *self)
Return this entry's Content-Language value, if available.
struct opendal_error * opendal_operator_stat_with_cancel(const struct opendal_operator *op, const char *path, const struct opendal_stat_options *opts, const struct opendal_cancel_token *cancel, struct opendal_metadata **meta)
Blocking stat the object in path with options and optional cancellation.
struct opendal_error * opendal_operator_rename_with_cancel(const struct opendal_operator *op, const char *src, const char *dest, const struct opendal_cancel_token *cancel)
Blocking rename the object from src to dest with optional cancellation.
void opendal_cancel_token_cancel(const struct opendal_cancel_token *token)
Signal cancellation on token.
struct opendal_error * opendal_operator_write_with_cancel(const struct opendal_operator *op, const char *path, const struct opendal_bytes *bytes, const struct opendal_write_options *opts, const struct opendal_cancel_token *cancel, struct opendal_metadata **meta)
Blocking write raw bytes to path with options, optional cancellation, and optional metadata output.
struct opendal_error * opendal_operator_stat_with(const struct opendal_operator *op, const char *path, const struct opendal_stat_options *opts, struct opendal_metadata **meta)
Blocking stat the object in path with options.
void opendal_write_options_set_content_encoding(struct opendal_write_options *opts, const char *content_encoding)
Set content_encoding.
struct opendal_error * opendal_reader_seek(struct opendal_reader *self, int64_t offset, int32_t whence, uint64_t *pos)
Seek to an offset, in bytes, in a stream, and write the new position to *pos.
void opendal_stat_options_set_override_content_type(struct opendal_stat_options *opts, const char *override_content_type)
Set override_content_type.
struct opendal_error * opendal_reader_read(struct opendal_reader *self, uint8_t *buf, uintptr_t len, uintptr_t *size)
Read data from the reader into buf and write the number of bytes read to *size.
struct opendal_copy_options * opendal_copy_options_new(void)
Construct a heap-allocated opendal_copy_options with default values.
struct opendal_error * opendal_operator_rename(const struct opendal_operator *op, const char *src, const char *dest)
Blocking rename the object in path.
void opendal_read_options_set_override_content_disposition(struct opendal_read_options *opts, const char *override_content_disposition)
Set override_content_disposition.
void opendal_presigned_request_free(struct opendal_presigned_request *req)
Free the presigned request.
void opendal_write_options_set_user_metadata(struct opendal_write_options *opts, const struct opendal_write_user_metadata_pair *pairs, uintptr_t len)
Set user_metadata.
char * opendal_operator_info_get_root(const struct opendal_operator_info *self)
Return the nul-terminated operator's working root path.
struct opendal_error * opendal_operator_presign_stat(const struct opendal_operator *op, const char *path, uint64_t expire_secs, struct opendal_presigned_request **req)
Presign a stat operation.
void opendal_write_options_set_append(struct opendal_write_options *opts, bool append)
Set append.
struct opendal_error * opendal_operator_read_with_cancel(const struct opendal_operator *op, const char *path, const struct opendal_read_options *opts, const struct opendal_cancel_token *cancel, struct opendal_bytes *bytes)
Blocking read the data from path with options and optional cancellation.
struct opendal_error * opendal_operator_exists(const struct opendal_operator *op, const char *path, bool *exists)
Check whether the path exists.
char * opendal_metadata_content_type(const struct opendal_metadata *self)
Return this entry's Content-Type value.
void opendal_writer_free(struct opendal_writer *ptr)
Frees the heap memory used by the opendal_writer.
void opendal_list_options_set_versions(struct opendal_list_options *opts, bool versions)
Set versions.
struct opendal_error * opendal_operator_deleter_with_cancel(const struct opendal_operator *op, const struct opendal_cancel_token *cancel, struct opendal_deleter **deleter_out)
Create a blocking deleter to remove multiple paths, supporting optional cancellation.
struct opendal_error * opendal_operator_check(const struct opendal_operator *op)
Check whether the operator works properly.
const char * opendal_presigned_request_method(const struct opendal_presigned_request *req)
char * opendal_entry_path(const struct opendal_entry *self)
Path of entry.
const char * opendal_presigned_request_uri(const struct opendal_presigned_request *req)
bool opendal_metadata_is_deleted(const struct opendal_metadata *self)
Return whether this metadata describes a deleted object or delete marker.
void opendal_read_options_set_chunk(struct opendal_read_options *opts, uintptr_t chunk)
Set chunk.
void opendal_write_options_set_cache_control(struct opendal_write_options *opts, const char *cache_control)
Set cache_control.
struct opendal_error * opendal_operator_create_dir_with_cancel(const struct opendal_operator *op, const char *path, const struct opendal_cancel_token *cancel)
Blocking create the directory in path with optional cancellation.
struct opendal_error * opendal_operator_check_with_cancel(const struct opendal_operator *op, const struct opendal_cancel_token *cancel)
Check whether the operator works properly, supporting optional cancellation.
void opendal_reader_options_set_if_match(struct opendal_reader_options *opts, const char *if_match)
Set if_match.
void opendal_write_options_set_concurrent(struct opendal_write_options *opts, uintptr_t concurrent)
Set concurrent.
bool opendal_metadata_is_dir(const struct opendal_metadata *self)
Return whether the path represents a directory.
uint64_t opendal_metadata_content_length(const struct opendal_metadata *self)
Return the full content length of this entry.
void(* opendal_log_callback)(int32_t level, const char *file, uint32_t line, const char *message)
Definition opendal.h:236
void opendal_reader_options_set_concurrent(struct opendal_reader_options *opts, uintptr_t concurrent)
Set concurrent.
void opendal_read_options_set_override_content_type(struct opendal_read_options *opts, const char *override_content_type)
Set override_content_type.
void opendal_reader_options_free(struct opendal_reader_options *opts)
Free the heap memory used by opendal_reader_options.
struct opendal_cancel_token * opendal_cancel_token_new(void)
Allocate a new uncancelled opendal_cancel_token.
struct opendal_error * opendal_deleter_delete_with_cancel(struct opendal_deleter *self, const char *path, const struct opendal_delete_options *opts, const struct opendal_cancel_token *cancel)
Submit path for deletion with per-path options, supporting cancellation via cancel.
void opendal_copy_options_set_chunk(struct opendal_copy_options *opts, uintptr_t chunk)
Set chunk.
void opendal_reader_options_set_if_none_match(struct opendal_reader_options *opts, const char *if_none_match)
Set if_none_match.
void opendal_copy_options_free(struct opendal_copy_options *opts)
Free the heap memory used by opendal_copy_options.
struct opendal_error * opendal_operator_presign_delete_with_cancel(const struct opendal_operator *op, const char *path, uint64_t expire_secs, const struct opendal_delete_options *opts, const struct opendal_cancel_token *cancel, struct opendal_presigned_request **req)
Presign a delete operation with options and optional cancellation.
void opendal_read_options_set_range(struct opendal_read_options *opts, uint64_t offset, uint64_t length)
Set the range to length bytes from offset.
void opendal_read_options_free(struct opendal_read_options *opts)
Free the heap memory used by opendal_read_options.
struct opendal_error * opendal_lister_next(struct opendal_lister *self, struct opendal_entry **entry)
Return the next object to be listed.
uint32_t opendal_c_abi_version(void)
struct opendal_metadata * opendal_entry_metadata(const struct opendal_entry *self)
Return the metadata associated with this entry.
void opendal_reader_options_set_gap(struct opendal_reader_options *opts, uintptr_t gap)
Set gap.
void opendal_write_options_set_if_none_match(struct opendal_write_options *opts, const char *if_none_match)
Set if_none_match.
void opendal_operator_options_set(struct opendal_operator_options *opts, const char *key, const char *value)
Set a Key-Value pair inside opendal_operator_options.
void opendal_stat_options_set_override_cache_control(struct opendal_stat_options *opts, const char *override_cache_control)
Set override_cache_control.
struct opendal_error * opendal_operator_stat(const struct opendal_operator *op, const char *path, struct opendal_metadata **meta)
Stat the path, return its metadata.
struct opendal_error * opendal_copier_abort_with_cancel(struct opendal_copier *self, const struct opendal_cancel_token *cancel)
Abort the pending copy operation, supporting cancellation via cancel.
void opendal_deleter_free(struct opendal_deleter *ptr)
Free the heap memory used by the opendal_deleter.
struct opendal_error * opendal_operator_reader(const struct opendal_operator *op, const char *path, struct opendal_reader **reader)
Blocking create a reader for the specified path.
const struct opendal_http_header_pair * opendal_presigned_request_headers(const struct opendal_presigned_request *req)
struct opendal_error * opendal_operator_presign_delete_with(const struct opendal_operator *op, const char *path, uint64_t expire_secs, const struct opendal_delete_options *opts, struct opendal_presigned_request **req)
Presign a delete operation with options.
struct opendal_stat_options * opendal_stat_options_new(void)
Construct a heap-allocated opendal_stat_options with default values.
struct opendal_error * opendal_deleter_delete_many_with_cancel(struct opendal_deleter *self, const char *const *paths, uintptr_t paths_len, const struct opendal_cancel_token *cancel)
Submit multiple paths for deletion in one call, supporting cancellation via cancel.
struct opendal_error * opendal_operator_delete(const struct opendal_operator *op, const char *path)
Blocking delete the object in path.
struct opendal_error * opendal_operator_presign_write_with_cancel(const struct opendal_operator *op, const char *path, uint64_t expire_secs, const struct opendal_write_options *opts, const struct opendal_cancel_token *cancel, struct opendal_presigned_request **req)
Presign a write operation with options and optional cancellation.
void opendal_bytes_free(struct opendal_bytes *ptr)
Frees the heap memory used by the opendal_bytes.
struct opendal_error * opendal_deleter_flush_with_cancel(struct opendal_deleter *self, const struct opendal_cancel_token *cancel)
Complete pending deletions and keep the deleter usable, supporting cancellation via cancel.
struct opendal_list_options * opendal_list_options_new(void)
Construct a heap-allocated opendal_list_options with default values.
struct opendal_error * opendal_operator_list_with(const struct opendal_operator *op, const char *path, const struct opendal_list_options *opts, struct opendal_lister **lister)
Blocking list the objects in path with options.
struct opendal_error * opendal_operator_presign_stat_with_cancel(const struct opendal_operator *op, const char *path, uint64_t expire_secs, const struct opendal_stat_options *opts, const struct opendal_cancel_token *cancel, struct opendal_presigned_request **req)
Presign a stat operation with options and optional cancellation.
struct opendal_presigned_request_inner opendal_presigned_request_inner
Definition opendal.h:110
struct opendal_error * opendal_operator_presign_read(const struct opendal_operator *op, const char *path, uint64_t expire_secs, struct opendal_presigned_request **req)
Presign a read operation.
void opendal_reader_options_set_prefetch(struct opendal_reader_options *opts, uintptr_t prefetch)
Set prefetch.
struct opendal_operator_options * opendal_operator_options_new(void)
Construct a heap-allocated opendal_operator_options.
void opendal_list_options_set_start_after(struct opendal_list_options *opts, const char *start_after)
Set start_after.
void opendal_read_options_set_override_cache_control(struct opendal_read_options *opts, const char *override_cache_control)
Set override_cache_control.
void opendal_entry_free(struct opendal_entry *ptr)
Frees the heap memory used by the opendal_list_entry.
int64_t opendal_metadata_last_modified_ms(const struct opendal_metadata *self)
Return this entry's Last-Modified timestamp.
struct opendal_operator_info * opendal_operator_info_new(const struct opendal_operator *op)
Get information of underlying accessor.
struct opendal_error * opendal_reader_seek_with_cancel(struct opendal_reader *self, int64_t offset, int32_t whence, const struct opendal_cancel_token *cancel, uint64_t *pos)
Seek to an offset, in bytes, in a stream, supporting cancellation via cancel.
struct opendal_metadata_user_metadata * opendal_metadata_get_user_metadata(const struct opendal_metadata *self)
Return the user metadata of the metadata.
struct opendal_error * opendal_deleter_delete(struct opendal_deleter *self, const char *path)
Submit path for deletion.
struct opendal_error * opendal_operator_writer(const struct opendal_operator *op, const char *path, struct opendal_writer **writer)
Blocking create a writer for the specified path.
opendal_bytes carries raw-bytes with its length
Definition opendal.h:150
uintptr_t capacity
Definition opendal.h:162
uintptr_t len
Definition opendal.h:158
uint8_t * data
Definition opendal.h:154
An opaque, thread-safe token used to cancel in-flight OpenDAL operations.
Definition opendal.h:129
void * inner
Definition opendal.h:134
Capability is used to describe what operations are supported by current Operator.
Definition opendal.h:1726
bool delete_with_if_version_not_match
Definition opendal.h:2028
bool write_can_append
Definition opendal.h:1814
bool compose_with_content_disposition
Definition opendal.h:2070
bool delete_with_if_version_match
Definition opendal.h:2024
bool read_with_if_version_match
Definition opendal.h:1976
bool read_with_if_version_not_match
Definition opendal.h:1980
bool delete_with_if_match
Definition opendal.h:2016
bool restore
Definition opendal.h:2114
bool stat_with_if_version_not_match
Definition opendal.h:1972
bool stat_with_version
Definition opendal.h:1762
bool copy_with_user_metadata
Definition opendal.h:2050
bool compose_with_cache_control
Definition opendal.h:2078
bool stat_with_if_modified_since
Definition opendal.h:1742
bool write_can_multi
Definition opendal.h:1806
bool write_with_user_metadata
Definition opendal.h:1846
uintptr_t copy_multi_min_size
Definition opendal.h:1912
bool write_with_if_none_match
Definition opendal.h:1838
bool list_with_start_after
Definition opendal.h:1928
bool compose_with_user_metadata
Definition opendal.h:2082
bool delete_
Definition opendal.h:1872
bool create_dir
Definition opendal.h:1868
bool list_with_versions
Definition opendal.h:1936
bool compose_with_if_version_match
Definition opendal.h:2094
uintptr_t write_multi_min_size
Definition opendal.h:1858
bool shared
Definition opendal.h:1964
bool write_with_content_language
Definition opendal.h:1996
bool stat_with_if_match
Definition opendal.h:1734
bool copy_with_content_type
Definition opendal.h:2054
bool stat_with_if_version_match
Definition opendal.h:1968
bool read_with_suffix
Definition opendal.h:1984
bool write_with_expires
Definition opendal.h:2008
bool restore_with_version
Definition opendal.h:2118
bool read_with_version
Definition opendal.h:1798
bool compose_with_content_type
Definition opendal.h:2066
bool read_with_checksum
Definition opendal.h:1988
bool stat_with_if_unmodified_since
Definition opendal.h:1746
bool compose_with_if_none_match
Definition opendal.h:2090
bool compose_with_if_match
Definition opendal.h:2086
bool read_with_override_content_type
Definition opendal.h:1786
bool compose_with_content_encoding
Definition opendal.h:2074
bool copy_with_content_language
Definition opendal.h:2058
bool write_with_if_not_exists
Definition opendal.h:1842
bool read_with_if_unmodified_since
Definition opendal.h:1794
bool compose_with_if_version_not_match
Definition opendal.h:2098
bool write_with_content_encoding
Definition opendal.h:1826
bool write_with_if_match
Definition opendal.h:1834
bool stat_with_override_content_disposition
Definition opendal.h:1754
bool rename_with_if_not_exists
Definition opendal.h:2126
bool presign_stat
Definition opendal.h:1952
bool read_with_if_match
Definition opendal.h:1770
bool compose_with_source_if_match
Definition opendal.h:2110
bool list_with_glob
Definition opendal.h:2130
uintptr_t delete_max_size
Definition opendal.h:2034
bool delete_with_version
Definition opendal.h:1876
bool write
Definition opendal.h:1802
bool presign_read
Definition opendal.h:1948
bool presign_delete
Definition opendal.h:1960
bool delete_with_recursive
Definition opendal.h:1880
bool write_with_content_type
Definition opendal.h:1818
uintptr_t write_total_max_size
Definition opendal.h:1864
bool copy_with_source_version
Definition opendal.h:1896
bool presign
Definition opendal.h:1944
bool read
Definition opendal.h:1766
bool copy_with_if_none_match
Definition opendal.h:2038
uintptr_t copy_multi_max_size
Definition opendal.h:1906
bool rename
Definition opendal.h:1916
bool list
Definition opendal.h:1920
bool write_with_cache_control
Definition opendal.h:1830
bool stat_with_if_none_match
Definition opendal.h:1738
bool write_with_if_version_not_match
Definition opendal.h:2004
bool compose_with_if_not_exists
Definition opendal.h:2102
bool write_can_copy_from
Definition opendal.h:1992
bool compose
Definition opendal.h:2062
bool list_with_deleted
Definition opendal.h:1940
uintptr_t write_multi_max_size
Definition opendal.h:1852
bool write_with_checksum
Definition opendal.h:2012
bool copy_with_if_not_exists
Definition opendal.h:1888
bool restore_with_if_not_exists
Definition opendal.h:2122
bool write_can_empty
Definition opendal.h:1810
bool copy
Definition opendal.h:1884
bool copy_with_if_version_not_match
Definition opendal.h:2046
bool stat
Definition opendal.h:1730
bool read_with_override_content_disposition
Definition opendal.h:1782
bool read_with_if_none_match
Definition opendal.h:1774
bool copy_with_if_version_match
Definition opendal.h:2042
bool compose_with_source_version
Definition opendal.h:2106
bool stat_with_override_content_type
Definition opendal.h:1758
bool read_with_if_modified_since
Definition opendal.h:1790
bool copy_can_multi
Definition opendal.h:1900
bool delete_with_if_none_match
Definition opendal.h:2020
bool list_with_recursive
Definition opendal.h:1932
bool write_with_content_disposition
Definition opendal.h:1822
bool stat_with_override_cache_control
Definition opendal.h:1750
bool copy_with_if_match
Definition opendal.h:1892
bool presign_write
Definition opendal.h:1956
bool list_with_limit
Definition opendal.h:1924
bool write_with_if_version_match
Definition opendal.h:2000
bool read_with_override_cache_control
Definition opendal.h:1778
opendal_copier completes a long-running copy operation to completion in a blocking manner....
Definition opendal.h:1669
void * inner
Definition opendal.h:1674
Options for copy operations.
Definition opendal.h:1540
uint64_t source_content_length_hint
Definition opendal.h:1614
bool if_not_exists
Definition opendal.h:1552
bool has_chunk
Definition opendal.h:1629
const char * if_match
Definition opendal.h:1570
uintptr_t chunk
Definition opendal.h:1646
bool has_source_content_length_hint
Definition opendal.h:1591
uintptr_t concurrent
Definition opendal.h:1625
const char * source_version
Definition opendal.h:1587
Options for delete operations.
Definition opendal.h:1246
char * version
Definition opendal.h:1259
bool recursive
Definition opendal.h:1273
opendal_deleter removes many paths from storage.
Definition opendal.h:1696
void * inner
Definition opendal.h:1701
opendal_list_entry is the entry under a path, which is listed from the opendal_lister
Definition opendal.h:215
void * inner
Definition opendal.h:220
The opendal error type for C binding, containing an error code and corresponding error message.
Definition opendal.h:184
struct opendal_bytes message
Definition opendal.h:186
enum opendal_code code
Definition opendal.h:185
Options for list operations.
Definition opendal.h:1467
bool recursive
Definition opendal.h:1474
bool versions
Definition opendal.h:1495
char * start_after
Definition opendal.h:1489
bool deleted
Definition opendal.h:1501
uintptr_t limit
Definition opendal.h:1480
Lister is designed to list entries at a given path in a blocking manner.
Definition opendal.h:199
void * inner
Definition opendal.h:204
Metadata for operator, users can use this metadata to get information of operator.
Definition opendal.h:1708
void * inner
Definition opendal.h:1713
The layers to apply when initializing an opendal_operator.
Definition opendal.h:246
void * inner
Definition opendal.h:251
The configuration for the initialization of opendal_operator.
Definition opendal.h:329
void * inner
Definition opendal.h:334
Used to access almost all OpenDAL APIs. It represents an operator that provides the unified interface...
Definition opendal.h:311
void * inner
Definition opendal.h:316
The underlying presigned request, which contains the HTTP method, URI, and headers....
Definition opendal.h:2137
struct opendal_presigned_request_inner * inner
Definition opendal.h:2138
Options for read operations.
Definition opendal.h:741
uint64_t length
Definition opendal.h:763
const char * if_match
Definition opendal.h:797
const char * override_content_type
Definition opendal.h:933
uintptr_t gap
Definition opendal.h:908
uintptr_t chunk
Definition opendal.h:897
const char * override_content_disposition
Definition opendal.h:955
int64_t if_modified_since
Definition opendal.h:838
bool has_if_unmodified_since
Definition opendal.h:842
bool has_if_modified_since
Definition opendal.h:821
bool has_content_length_hint
Definition opendal.h:912
const char * version
Definition opendal.h:779
const char * override_cache_control
Definition opendal.h:944
bool has_length
Definition opendal.h:753
int64_t if_unmodified_since
Definition opendal.h:859
bool has_chunk
Definition opendal.h:877
const char * if_none_match
Definition opendal.h:817
bool has_gap
Definition opendal.h:901
uint64_t content_length_hint
Definition opendal.h:922
uint64_t offset
Definition opendal.h:748
uintptr_t concurrent
Definition opendal.h:873
Options for reader operations.
Definition opendal.h:1018
bool has_if_modified_since
Definition opendal.h:1077
bool has_if_unmodified_since
Definition opendal.h:1098
int64_t if_unmodified_since
Definition opendal.h:1115
bool has_gap
Definition opendal.h:1170
const char * if_match
Definition opendal.h:1053
uintptr_t chunk
Definition opendal.h:1166
bool has_chunk
Definition opendal.h:1148
uintptr_t gap
Definition opendal.h:1177
const char * version
Definition opendal.h:1034
uintptr_t prefetch
Definition opendal.h:1192
uint64_t content_length_hint
Definition opendal.h:1129
bool has_content_length_hint
Definition opendal.h:1119
const char * if_none_match
Definition opendal.h:1073
uintptr_t concurrent
Definition opendal.h:1144
int64_t if_modified_since
Definition opendal.h:1094
The result type returned by opendal's reader operation.
Definition opendal.h:964
void * inner
Definition opendal.h:969
Options for stat operations.
Definition opendal.h:1309
const char * override_content_type
Definition opendal.h:1416
const char * if_match
Definition opendal.h:1343
const char * version
Definition opendal.h:1325
bool has_if_unmodified_since
Definition opendal.h:1388
int64_t if_unmodified_since
Definition opendal.h:1405
const char * if_none_match
Definition opendal.h:1363
const char * override_cache_control
Definition opendal.h:1427
bool has_if_modified_since
Definition opendal.h:1367
int64_t if_modified_since
Definition opendal.h:1384
const char * override_content_disposition
Definition opendal.h:1438
Options for write operations.
Definition opendal.h:402
bool has_chunk
Definition opendal.h:621
const char * if_none_match
Definition opendal.h:571
const char * content_type
Definition opendal.h:476
const char * content_disposition
Definition opendal.h:502
uintptr_t chunk
Definition opendal.h:661
const struct opendal_write_user_metadata_pair * user_metadata
Definition opendal.h:692
const char * cache_control
Definition opendal.h:454
bool if_not_exists
Definition opendal.h:583
bool append
Definition opendal.h:420
uintptr_t user_metadata_len
Definition opendal.h:696
uintptr_t concurrent
Definition opendal.h:617
const char * if_match
Definition opendal.h:547
const char * content_encoding
Definition opendal.h:529
The result type returned by opendal's writer operation.
Definition opendal.h:1200
void * inner
Definition opendal.h:1205