Eio integration for Init INI parser.
Provides file system operations using Eio paths and flows.
Error handling
val err : Init.Error.t -> exnerr e creates an Eio exception from e.
Path operations
val decode_path :
?config:Init_bytesrw.config ->
?locs:bool ->
?layout:bool ->
'a Init.t ->
_ Eio.Path.t ->
('a, Init.Error.t) resultdecode_path codec path reads and decodes the file at path.
val decode_path_exn :
?config:Init_bytesrw.config ->
?locs:bool ->
?layout:bool ->
'a Init.t ->
_ Eio.Path.t ->
'adecode_path_exn is like decode_path but raises on error.
val encode_path :
?buf:bytes ->
'a Init.t ->
'a ->
_ Eio.Path.t ->
(unit, Init.Error.t) resultencode_path codec v path encodes v and writes to path.
val encode_path_exn : ?buf:bytes -> 'a Init.t -> 'a -> _ Eio.Path.t -> unitencode_path_exn is like encode_path but raises on error.
Flow operations
val decode_flow :
?config:Init_bytesrw.config ->
?locs:bool ->
?layout:bool ->
?file:Init.Textloc.fpath ->
'a Init.t ->
_ Eio.Flow.source ->
('a, Init.Error.t) resultdecode_flow codec flow decodes from flow.
val decode_flow_exn :
?config:Init_bytesrw.config ->
?locs:bool ->
?layout:bool ->
?file:Init.Textloc.fpath ->
'a Init.t ->
_ Eio.Flow.source ->
'adecode_flow_exn is like decode_flow but raises on error.
val encode_flow :
?buf:bytes ->
'a Init.t ->
'a ->
eod:bool ->
_ Eio.Flow.sink ->
(unit, Init.Error.t) resultencode_flow codec v flow encodes v to flow.
val encode_flow_exn :
?buf:bytes ->
'a Init.t ->
'a ->
eod:bool ->
_ Eio.Flow.sink ->
unitencode_flow_exn is like encode_flow but raises on error.