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.
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_operator_free(const struct opendal_operator *ptr)
Free the heap-allocated operator pointed by opendal_operator.
struct opendal_error * opendal_operator_create_dir(const struct opendal_operator *op, const char *path)
Blocking create the directory in path.
struct opendal_result_reader_read opendal_reader_read(struct opendal_reader *self, uint8_t *buf, uintptr_t len)
Read data from the reader.
const char * path
Definition opendal.h:1033
struct opendal_result_operator_new opendal_operator_new(const char *scheme, const struct opendal_operator_options *options)
Construct an operator based on scheme and options
struct opendal_result_lister_next opendal_lister_next(struct opendal_lister *self)
Return the next object to be listed.
char * opendal_operator_info_get_scheme(const struct opendal_operator_info *self)
Return the nul-terminated operator's scheme, i.e. service.
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.
struct opendal_result_exists opendal_operator_exists(const struct opendal_operator *op, const char *path)
Check whether the path exists.
struct opendal_error * opendal_operator_copy(const struct opendal_operator *op, const char *src, const char *dest)
Blocking copy the object in path.
opendal_code
The error code for all opendal APIs in C binding.
Definition opendal.h:33
@ OPENDAL_CONDITION_NOT_MATCH
Definition opendal.h:77
@ OPENDAL_UNSUPPORTED
Definition opendal.h:41
@ OPENDAL_NOT_FOUND
Definition opendal.h:49
@ OPENDAL_IS_A_DIRECTORY
Definition opendal.h:57
@ OPENDAL_UNEXPECTED
Definition opendal.h:37
@ OPENDAL_PERMISSION_DENIED
Definition opendal.h:53
@ OPENDAL_ALREADY_EXISTS
Definition opendal.h:65
@ OPENDAL_IS_SAME_FILE
Definition opendal.h:73
@ OPENDAL_RANGE_NOT_SATISFIED
Definition opendal.h:81
@ OPENDAL_NOT_A_DIRECTORY
Definition opendal.h:61
@ OPENDAL_RATE_LIMITED
Definition opendal.h:69
@ OPENDAL_CONFIG_INVALID
Definition opendal.h:45
struct opendal_result_writer_write opendal_writer_write(struct opendal_writer *self, const struct opendal_bytes *bytes)
Write data to the writer.
void opendal_lister_free(struct opendal_lister *ptr)
Free the heap-allocated metadata used by opendal_lister.
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_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.
struct opendal_capability opendal_operator_info_get_native_capability(const struct opendal_operator_info *self)
Return the operator's native capability.
struct opendal_result_stat opendal_operator_stat(const struct opendal_operator *op, const char *path)
Stat the path, return its metadata.
void opendal_metadata_free(struct opendal_metadata *ptr)
Free the heap-allocated metadata used by opendal_metadata.
__attribute__((deprecated("Use opendal_operator_exists() instead."))) struct opendal_result_is_exist opendal_operator_is_exist(const struct opendal_operator *op
Check whether the path exists.
struct opendal_capability opendal_operator_info_get_full_capability(const struct opendal_operator_info *self)
Return the operator's full capability.
struct opendal_error * opendal_operator_rename(const struct opendal_operator *op, const char *src, const char *dest)
Blocking rename the object in path.
char * opendal_operator_info_get_root(const struct opendal_operator_info *self)
Return the nul-terminated operator's working root path.
struct opendal_result_read opendal_operator_read(const struct opendal_operator *op, const char *path)
Blocking read the data from path.
void opendal_writer_free(struct opendal_writer *ptr)
Frees the heap memory used by the opendal_writer.
char * opendal_entry_path(const struct opendal_entry *self)
Path of entry.
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 content_length of the metadata.
struct opendal_result_operator_reader opendal_operator_reader(const struct opendal_operator *op, const char *path)
Blocking read the data from path.
struct opendal_error * opendal_operator_delete(const struct opendal_operator *op, const char *path)
Blocking delete the object in path.
void opendal_bytes_free(struct opendal_bytes *ptr)
Frees the heap memory used by the opendal_bytes.
struct opendal_result_operator_writer opendal_operator_writer(const struct opendal_operator *op, const char *path)
Blocking create a writer for the specified path.
void opendal_operator_options_set(struct opendal_operator_options *self, const char *key, const char *value)
Set a Key-Value pair inside opendal_operator_options.
struct opendal_operator_options * opendal_operator_options_new(void)
Construct a heap-allocated opendal_operator_options.
struct opendal_result_list opendal_operator_list(const struct opendal_operator *op, const char *path)
Blocking list the objects in path.
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 the last_modified of the metadata, in milliseconds.
struct opendal_operator_info * opendal_operator_info_new(const struct opendal_operator *op)
Get information of underlying accessor.
opendal_bytes carries raw-bytes with its length
Definition opendal.h:93
uintptr_t capacity
Definition opendal.h:105
uintptr_t len
Definition opendal.h:101
uint8_t * data
Definition opendal.h:97
Capability is used to describe what operations are supported by current Operator.
Definition opendal.h:437
bool write_can_append
Definition opendal.h:489
bool write_can_multi
Definition opendal.h:481
bool list_with_start_after
Definition opendal.h:553
bool delete_
Definition opendal.h:533
bool create_dir
Definition opendal.h:529
bool blocking
Definition opendal.h:581
uintptr_t write_multi_min_size
Definition opendal.h:517
bool shared
Definition opendal.h:577
bool stat_with_if_match
Definition opendal.h:445
bool read_with_override_content_type
Definition opendal.h:473
bool presign_stat
Definition opendal.h:569
bool read_with_if_match
Definition opendal.h:457
bool write
Definition opendal.h:477
bool presign_read
Definition opendal.h:565
bool write_with_content_type
Definition opendal.h:493
uintptr_t write_total_max_size
Definition opendal.h:525
bool presign
Definition opendal.h:561
bool read
Definition opendal.h:453
bool rename
Definition opendal.h:541
bool list
Definition opendal.h:545
bool write_with_cache_control
Definition opendal.h:501
bool stat_with_if_none_match
Definition opendal.h:449
uintptr_t write_multi_max_size
Definition opendal.h:509
bool write_can_empty
Definition opendal.h:485
bool copy
Definition opendal.h:537
bool stat
Definition opendal.h:441
bool read_with_override_content_disposition
Definition opendal.h:469
bool read_with_if_none_match
Definition opendal.h:461
bool list_with_recursive
Definition opendal.h:557
bool write_with_content_disposition
Definition opendal.h:497
bool presign_write
Definition opendal.h:573
bool list_with_limit
Definition opendal.h:549
bool read_with_override_cache_control
Definition opendal.h:465
opendal_list_entry is the entry under a path, which is listed from the opendal_lister
Definition opendal.h:140
void * inner
Definition opendal.h:145
The opendal error type for C binding, containing an error code and corresponding error message.
Definition opendal.h:127
struct opendal_bytes message
Definition opendal.h:129
enum opendal_code code
Definition opendal.h:128
BlockingLister is designed to list entries at given path in a blocking manner.
Definition opendal.h:175
void * inner
Definition opendal.h:180
Metadata for operator, users can use this metadata to get information of operator.
Definition opendal.h:425
void * inner
Definition opendal.h:430
The configuration for the initialization of opendal_operator.
Definition opendal.h:256
void * inner
Definition opendal.h:261
Used to access almost all OpenDAL APIs. It represents an operator that provides the unified interface...
Definition opendal.h:215
void * inner
Definition opendal.h:220
The result type returned by opendal's reader operation.
Definition opendal.h:289
void * inner
Definition opendal.h:294
The result type returned by opendal_operator_exists().
Definition opendal.h:374
bool exists
Definition opendal.h:378
struct opendal_error * error
Definition opendal.h:382
The result type returned by opendal_operator_is_exist().
Definition opendal.h:353
struct opendal_error * error
Definition opendal.h:361
bool is_exist
Definition opendal.h:357
The result type returned by opendal_operator_list().
Definition opendal.h:410
struct opendal_lister * lister
Definition opendal.h:414
struct opendal_error * error
Definition opendal.h:418
The result type returned by opendal_lister_next(). The list entry is the list result of the list oper...
Definition opendal.h:155
struct opendal_entry * entry
Definition opendal.h:159
struct opendal_error * error
Definition opendal.h:163
The result type returned by opendal_operator_new() operation.
Definition opendal.h:235
struct opendal_operator * op
Definition opendal.h:239
struct opendal_error * error
Definition opendal.h:243
The result type returned by opendal_operator_reader(). The result type for opendal_operator_reader(),...
Definition opendal.h:303
struct opendal_error * error
Definition opendal.h:311
struct opendal_reader * reader
Definition opendal.h:307
The result type returned by opendal_operator_writer(). The result type for opendal_operator_writer(),...
Definition opendal.h:332
struct opendal_writer * writer
Definition opendal.h:336
struct opendal_error * error
Definition opendal.h:340
The result type returned by opendal's read operation.
Definition opendal.h:272
struct opendal_bytes data
Definition opendal.h:276
struct opendal_error * error
Definition opendal.h:280
The is the result type returned by opendal_reader_read(). The result type contains a size field,...
Definition opendal.h:589
struct opendal_error * error
Definition opendal.h:597
uintptr_t size
Definition opendal.h:593
The result type returned by opendal_operator_stat().
Definition opendal.h:392
struct opendal_metadata * meta
Definition opendal.h:396
struct opendal_error * error
Definition opendal.h:400
The result type returned by opendal_writer_write(). The result type contains a size field,...
Definition opendal.h:605
uintptr_t size
Definition opendal.h:609
struct opendal_error * error
Definition opendal.h:613
The result type returned by opendal's writer operation.
Definition opendal.h:319
void * inner
Definition opendal.h:324