package b0

  1. Overview
  2. Docs

File reads.

File reads

type t

The type for file read operations.

val v_op : id:id -> mark:mark -> created:B00_std.Time.span -> ?post_exec:(op -> unit) -> ?k:(op -> unit) -> B00_std.Fpath.t -> op

v_op declares a file read operation, see the corresponding accessors in Read for the semantics of the various arguments.

val v : file:B00_std.Fpath.t -> data:string -> t

v constructs a bare read operation.

val get : op -> t

get o is the read o. Raise Invalid_argument if o is not a read.

val file : t -> B00_std.Fpath.t

file r is the file read by r.

val data : t -> string

data r is the read data.

val set_data : t -> string -> unit

set_data r d sets the read data to d.

val discard_data : t -> unit

discard_data () discards read data.

OCaml

Innovation. Community. Security.