Skip to content

Commit

Permalink
format code
Browse files Browse the repository at this point in the history
  • Loading branch information
Ranxy committed Aug 6, 2023
1 parent 2991cca commit 0ef299e
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 9 deletions.
3 changes: 2 additions & 1 deletion bindings/ocaml/lib/blocking_operator.ml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ type scheme = SchemeStr of string | Scheme of Opendalinner.Scheme.scheme

let new_operator (input : scheme) (args : (string * string) list) =
match input with
| SchemeStr str -> Opendalinner.Block_operator.new_blocking_operator_str str args
| SchemeStr str ->
Opendalinner.Block_operator.new_blocking_operator_str str args
| Scheme s -> Opendalinner.Block_operator.new_blocking_operator s args

let is_exist = Opendalinner.Block_operator.blocking_is_exist
Expand Down
24 changes: 16 additions & 8 deletions bindings/ocaml/lib/blocking_operator.mli
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
*)

(** Services that OpenDAL supports *)
type scheme =
| SchemeStr of string (** [SchemeStr]: Parse a string as Scheme *)
| Scheme of Opendalinner.Scheme.scheme (** [Scheme]: Use the scheme directly *)

type scheme =
| SchemeStr of string (** [SchemeStr]: Parse a string as Scheme *)
| Scheme of Opendalinner.Scheme.scheme
(** [Scheme]: Use the scheme directly *)

val new_operator :
scheme ->
Expand All @@ -35,7 +35,9 @@ val new_operator :
*)

val is_exist :
Opendalinner.Block_operator.blocking_operator -> string -> (bool, string) result
Opendalinner.Block_operator.blocking_operator ->
string ->
(bool, string) result
(** [is_exist operator path] Check if this path exists or not.
@param operator The block operator
Expand All @@ -44,7 +46,9 @@ val is_exist :
*)

val create_dir :
Opendalinner.Block_operator.blocking_operator -> string -> (bool, string) result
Opendalinner.Block_operator.blocking_operator ->
string ->
(bool, string) result
(** [create_dir operator path] Create a dir at given path.
# Notes
Expand Down Expand Up @@ -114,7 +118,9 @@ val rename :
*)

val delete :
Opendalinner.Block_operator.blocking_operator -> string -> (unit, string) result
Opendalinner.Block_operator.blocking_operator ->
string ->
(unit, string) result
(** [delete operator path] Delete given path.
- Delete not existing error won't return errors.
@param operator The block operator
Expand All @@ -132,7 +138,9 @@ val remove :
*)

val remove_all :
Opendalinner.Block_operator.blocking_operator -> string -> (unit, string) result
Opendalinner.Block_operator.blocking_operator ->
string ->
(unit, string) result
(** [remove_all operator path] Remove the path and all nested dirs and files recursively.
- We don't support batch delete now, will call delete on each object in turn
@param operator The block operator
Expand Down

0 comments on commit 0ef299e

Please sign in to comment.