Opendal.Operator
val new_operator :
string ->
(string * string) list ->
(Opendal_core.Operator.operator, string) Stdlib.result
new_operator scheme config_map
Create a new block operator from given scheme and config_map.
val list :
Opendal_core.Operator.operator ->
string ->
(Opendal_core.Operator.entry array, string) Stdlib.result
val stat :
Opendal_core.Operator.operator ->
string ->
(Opendal_core.Operator.metadata, string) Stdlib.result
is_exist operator path
Get current path's metadata **without cache** directly.
val is_exist :
Opendal_core.Operator.operator ->
string ->
(bool, string) Stdlib.result
is_exist operator path
Check if this path exists or not.
val create_dir :
Opendal_core.Operator.operator ->
string ->
(bool, string) Stdlib.result
create_dir operator path
Create a dir at given path.
# Notes
To indicate that a path is a directory, it is compulsory to include a trailing / in the path. Failure to do so may result in `NotADirectory` error being returned by OpenDAL.
# Behavior
val read :
Opendal_core.Operator.operator ->
string ->
(char array, string) Stdlib.result
read operator path
Read the whole path into a bytes.
val reader :
Opendal_core.Operator.operator ->
string ->
(Opendal_core.Operator.reader, string) Stdlib.result
read operator path
Create a new reader which can read the whole path.
val write :
Opendal_core.Operator.operator ->
string ->
bytes ->
(unit, string) Stdlib.result
write operator path data
Write bytes into given path.
val copy :
Opendal_core.Operator.operator ->
string ->
string ->
(unit, string) Stdlib.result
copy operator from to
Copy a file from from
to to
.
from
and to
must be a file.to
will be overwritten if it exists.from
and to
are the same, nothing will happen.from
and to
input, the result will be the same.val rename :
Opendal_core.Operator.operator ->
string ->
string ->
(unit, string) Stdlib.result
rename operator from to
Rename a file from from
to to
.
from
and to
must be a file.to
will be overwritten if it exists.from
and to
are the same, a `IsSameFile` error will occur.val delete :
Opendal_core.Operator.operator ->
string ->
(unit, string) Stdlib.result
delete operator path
Delete given path.
val remove :
Opendal_core.Operator.operator ->
string array ->
(unit, string) Stdlib.result
remove operator paths
Remove path array.
val remove_all :
Opendal_core.Operator.operator ->
string ->
(unit, string) Stdlib.result
remove_all operator path
Remove the path and all nested dirs and files recursively.
module Reader : sig ... end
module Metadata : sig ... end
module Entry : sig ... end