Apache OpenDALâ„¢ C Binding
The C binding for Apache OpenDALâ„¢
Loading...
Searching...
No Matches
opendal.h
Go to the documentation of this file.
1/*
2 * Licensed to the Apache Software Foundation (ASF) under one
3 * or more contributor license agreements. See the NOTICE file
4 * distributed with this work for additional information
5 * regarding copyright ownership. The ASF licenses this file
6 * to you under the Apache License, Version 2.0 (the
7 * "License"); you may not use this file except in compliance
8 * with the License. You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing,
13 * software distributed under the License is distributed on an
14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 * KIND, either express or implied. See the License for the
16 * specific language governing permissions and limitations
17 * under the License.
18 */
19
20#ifndef _OPENDAL_H
21#define _OPENDAL_H
22
23#include <stdint.h>
24#include <stddef.h>
25#include <stdbool.h>
26
30#define OPENDAL_SEEK_SET 0
31
35#define OPENDAL_SEEK_CUR 1
36
40#define OPENDAL_SEEK_END 2
41
109
111
136
150typedef struct opendal_bytes {
154 uint8_t *data;
158 uintptr_t len;
162 uintptr_t capacity;
164
188
206
215typedef struct opendal_entry {
220 void *inner;
222
236typedef void (*opendal_log_callback)(int32_t level,
237 const char *file,
238 uint32_t line,
239 const char *message);
240
253
272
283
297
318
336
358
698
957
971
1194
1207
1275
1440
1503
1648
1676
1703
1715
1726typedef struct opendal_capability {
1730 bool stat;
1766 bool read;
1802 bool write;
1884 bool copy;
1920 bool list;
2132
2140
2154
2155#ifdef __cplusplus
2156extern "C" {
2157#endif // __cplusplus
2158
2164
2169
2176const char *opendal_c_version(void);
2177
2185
2193
2200
2208
2213
2228 struct opendal_entry **entry);
2229
2239 const struct opendal_cancel_token *cancel,
2240 struct opendal_entry **entry);
2241
2246
2267
2272
2277 bool jitter,
2278 float factor,
2279 uint64_t min_delay_ns,
2280 uint64_t max_delay_ns,
2281 uint64_t max_times);
2282
2287 uint64_t timeout_ns,
2288 uint64_t io_timeout_ns);
2289
2294
2299
2305uint8_t opendal_metadata_mode(const struct opendal_metadata *self);
2306
2313
2318
2325
2330
2337
2344
2351
2358
2375
2381char *opendal_metadata_etag(const struct opendal_metadata *self);
2382
2389
2396
2403
2408
2413
2418
2423
2428
2448
2494struct opendal_error *opendal_operator_new(const char *scheme,
2495 const struct opendal_operator_options *options,
2496 struct opendal_operator **op);
2497
2520 const struct opendal_operator_options *options,
2521 const struct opendal_operator_layers *layers,
2522 struct opendal_operator **op);
2523
2571 const char *path,
2572 const struct opendal_bytes *bytes);
2573
2588 const char *path,
2589 const struct opendal_bytes *bytes,
2590 const struct opendal_write_options *opts);
2591
2631 const char *path,
2632 const struct opendal_bytes *bytes,
2633 const struct opendal_write_options *opts,
2634 struct opendal_metadata **meta);
2635
2663 const char *path,
2664 const struct opendal_bytes *bytes,
2665 const struct opendal_write_options *opts,
2666 const struct opendal_cancel_token *cancel,
2667 struct opendal_metadata **meta);
2668
2712 const char *path,
2713 struct opendal_bytes *bytes);
2714
2751 const char *path,
2752 const struct opendal_read_options *opts,
2753 struct opendal_bytes *bytes);
2754
2770 const char *path,
2771 const struct opendal_read_options *opts,
2772 const struct opendal_cancel_token *cancel,
2773 struct opendal_bytes *bytes);
2774
2809 const char *path,
2810 struct opendal_reader **reader);
2811
2843 const char *path,
2844 const struct opendal_reader_options *opts,
2845 struct opendal_reader **reader);
2846
2862 const char *path,
2863 const struct opendal_reader_options *opts,
2864 const struct opendal_cancel_token *cancel,
2865 struct opendal_reader **reader);
2866
2905 const char *path,
2906 struct opendal_writer **writer);
2907
2924 const char *path,
2925 const struct opendal_write_options *opts,
2926 struct opendal_writer **writer);
2927
2948 const char *path,
2949 const struct opendal_write_options *opts,
2950 const struct opendal_cancel_token *cancel,
2951 struct opendal_writer **writer);
2952
2995struct opendal_error *opendal_operator_delete(const struct opendal_operator *op, const char *path);
2996
3024 const char *path,
3025 const struct opendal_delete_options *opts);
3026
3040 const char *path,
3041 const struct opendal_delete_options *opts,
3042 const struct opendal_cancel_token *cancel);
3043
3085 const char *path,
3086 bool *is_exist);
3087
3129 const char *path,
3130 bool *exists);
3131
3140 const char *path,
3141 const struct opendal_cancel_token *cancel,
3142 bool *exists);
3143
3180 const char *path,
3181 struct opendal_metadata **meta);
3182
3213 const char *path,
3214 const struct opendal_stat_options *opts,
3215 struct opendal_metadata **meta);
3216
3232 const char *path,
3233 const struct opendal_stat_options *opts,
3234 const struct opendal_cancel_token *cancel,
3235 struct opendal_metadata **meta);
3236
3289 const char *path,
3290 struct opendal_lister **lister);
3291
3322 const char *path,
3323 const struct opendal_list_options *opts,
3324 struct opendal_lister **lister);
3325
3341 const char *path,
3342 const struct opendal_list_options *opts,
3343 const struct opendal_cancel_token *cancel,
3344 struct opendal_lister **lister);
3345
3382 const char *path);
3383
3390 const char *path,
3391 const struct opendal_cancel_token *cancel);
3392
3437 const char *src,
3438 const char *dest);
3439
3446 const char *src,
3447 const char *dest,
3448 const struct opendal_cancel_token *cancel);
3449
3494 const char *src,
3495 const char *dest);
3496
3555 const char *src,
3556 const char *dest,
3557 const struct opendal_copy_options *opts);
3558
3572 const char *src,
3573 const char *dest,
3574 const struct opendal_copy_options *opts,
3575 const struct opendal_cancel_token *cancel);
3576
3581
3588 const struct opendal_cancel_token *cancel);
3589
3616 const char *src,
3617 const char *dest,
3618 struct opendal_copier **copier);
3619
3644 const char *src,
3645 const char *dest,
3646 const struct opendal_copy_options *opts,
3647 struct opendal_copier **copier);
3648
3665 const char *src,
3666 const char *dest,
3667 const struct opendal_copy_options *opts,
3668 const struct opendal_cancel_token *cancel,
3669 struct opendal_copier **copier);
3670
3687 struct opendal_deleter **deleter_out);
3688
3697 const struct opendal_cancel_token *cancel,
3698 struct opendal_deleter **deleter_out);
3699
3719
3724
3731
3738
3746
3751 struct opendal_capability *cap);
3752
3762 const char *path,
3763 uint64_t expire_secs,
3764 struct opendal_presigned_request **req);
3765
3782 const char *path,
3783 uint64_t expire_secs,
3784 const struct opendal_read_options *opts,
3785 struct opendal_presigned_request **req);
3786
3802 const char *path,
3803 uint64_t expire_secs,
3804 const struct opendal_read_options *opts,
3805 const struct opendal_cancel_token *cancel,
3806 struct opendal_presigned_request **req);
3807
3817 const char *path,
3818 uint64_t expire_secs,
3819 struct opendal_presigned_request **req);
3820
3840 const char *path,
3841 uint64_t expire_secs,
3842 const struct opendal_write_options *opts,
3843 struct opendal_presigned_request **req);
3844
3863 const char *path,
3864 uint64_t expire_secs,
3865 const struct opendal_write_options *opts,
3866 const struct opendal_cancel_token *cancel,
3867 struct opendal_presigned_request **req);
3868
3878 const char *path,
3879 uint64_t expire_secs,
3880 struct opendal_presigned_request **req);
3881
3898 const char *path,
3899 uint64_t expire_secs,
3900 const struct opendal_delete_options *opts,
3901 struct opendal_presigned_request **req);
3902
3918 const char *path,
3919 uint64_t expire_secs,
3920 const struct opendal_delete_options *opts,
3921 const struct opendal_cancel_token *cancel,
3922 struct opendal_presigned_request **req);
3923
3933 const char *path,
3934 uint64_t expire_secs,
3935 struct opendal_presigned_request **req);
3936
3953 const char *path,
3954 uint64_t expire_secs,
3955 const struct opendal_stat_options *opts,
3956 struct opendal_presigned_request **req);
3957
3973 const char *path,
3974 uint64_t expire_secs,
3975 const struct opendal_stat_options *opts,
3976 const struct opendal_cancel_token *cancel,
3977 struct opendal_presigned_request **req);
3978
3983
3988
3993
3998
4003
4009void opendal_string_free(char *ptr);
4010
4015
4024
4037
4047
4059 const char *start_after);
4060
4072
4084
4091
4100
4121
4144
4169 const char *if_none_match);
4170
4192 int64_t if_modified_since);
4193
4215 int64_t if_unmodified_since);
4216
4232 const char *override_content_type);
4233
4249 const char *override_cache_control);
4250
4266 const char *override_content_disposition);
4267
4274
4283
4299
4319
4326
4335
4357 uint64_t offset,
4358 uint64_t length);
4359
4374
4395
4418
4443 const char *if_none_match);
4444
4466 int64_t if_modified_since);
4467
4489 int64_t if_unmodified_since);
4490
4508
4534
4547
4563 uint64_t content_length_hint);
4564
4580 const char *override_content_type);
4581
4597 const char *override_cache_control);
4598
4614 const char *override_content_disposition);
4615
4622
4631
4652
4675
4700 const char *if_none_match);
4701
4723 int64_t if_modified_since);
4724
4746 int64_t if_unmodified_since);
4747
4763 uint64_t content_length_hint);
4764
4783 uintptr_t concurrent);
4784
4808
4821
4840
4847
4856
4880
4919 const char *cache_control);
4920
4946 const char *content_type);
4947
4978 const char *content_disposition);
4979
5011 const char *content_encoding);
5012
5035
5064 const char *if_none_match);
5065
5083 bool if_not_exists);
5084
5122
5168
5204 const struct opendal_write_user_metadata_pair *pairs,
5205 uintptr_t len);
5206
5213
5222
5240
5263
5285 const char *source_version);
5286
5316
5331
5354
5361
5371
5392 const char *key,
5393 const char *value);
5394
5399
5407char *opendal_entry_path(const struct opendal_entry *self);
5408
5418char *opendal_entry_name(const struct opendal_entry *self);
5419
5427
5432
5440 uint8_t *buf,
5441 uintptr_t len,
5442 uintptr_t *size);
5443
5452 uint8_t *buf,
5453 uintptr_t len,
5454 const struct opendal_cancel_token *cancel,
5455 uintptr_t *size);
5456
5463 int64_t offset,
5464 int32_t whence,
5465 uint64_t *pos);
5466
5475 int64_t offset,
5476 int32_t whence,
5477 const struct opendal_cancel_token *cancel,
5478 uint64_t *pos);
5479
5484
5491 const struct opendal_bytes *bytes,
5492 uintptr_t *size);
5493
5507 const struct opendal_bytes *bytes,
5508 const struct opendal_cancel_token *cancel,
5509 uintptr_t *size);
5510
5515
5529 struct opendal_metadata **meta);
5530
5549 const struct opendal_cancel_token *cancel,
5550 struct opendal_metadata **meta);
5551
5556
5574 uintptr_t *size,
5575 bool *has_next);
5576
5585 const struct opendal_cancel_token *cancel,
5586 uintptr_t *size,
5587 bool *has_next);
5588
5596
5605 const struct opendal_cancel_token *cancel);
5606
5611
5629struct opendal_error *opendal_deleter_delete(struct opendal_deleter *self, const char *path);
5630
5656 const char *const *paths,
5657 uintptr_t paths_len);
5658
5670 const char *const *paths,
5671 uintptr_t paths_len,
5672 const struct opendal_cancel_token *cancel);
5673
5696 const char *path,
5697 const struct opendal_delete_options *opts);
5698
5717 const char *path,
5718 const struct opendal_delete_options *opts,
5719 const struct opendal_cancel_token *cancel);
5720
5730
5740 const struct opendal_cancel_token *cancel);
5741
5749
5750#ifdef __cplusplus
5751} // extern "C"
5752#endif // __cplusplus
5753
5754#endif /* _OPENDAL_H */
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
The key-value pair for the headers of the presigned request.
Definition opendal.h:2144
const char * key
Definition opendal.h:2148
const char * value
Definition opendal.h:2152
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
A user metadata key-value pair.
Definition opendal.h:287
const char * key
Definition opendal.h:291
const char * value
Definition opendal.h:295
User metadata associated with a path.
Definition opendal.h:276
void * inner
Definition opendal.h:281
Carries all metadata associated with a path.
Definition opendal.h:265
void * inner
Definition opendal.h:270
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
A key-value pair for write user metadata.
Definition opendal.h:344
const char * value
Definition opendal.h:356
const char * key
Definition opendal.h:350
The result type returned by opendal's writer operation.
Definition opendal.h:1200
void * inner
Definition opendal.h:1205