package b0

  1. Overview
  2. Docs
On This Page
  1. File reads
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Op.ReadSource

File reads.

File reads

Sourcetype t

The type for file read operations.

Sourceval make_op : id:id -> mark:mark -> created:B0_std.Mtime.Span.t -> ?post_exec:(op -> unit) -> ?k:(op -> unit) -> B0_std.Fpath.t -> op

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

Sourceval make : file:B0_std.Fpath.t -> data:string -> t

make constructs a bare read operation.

Sourceval get : op -> t

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

Sourceval file : t -> B0_std.Fpath.t

file r is the file read by r.

Sourceval data : t -> string

data r is the read data.

Sourceval set_data : t -> string -> unit

set_data r d sets the read data to d.

Sourceval discard_data : t -> unit

discard_data () discards read data.