package b0

  1. Overview
  2. Docs
On This Page
  1. File writes
Module type
Class type

File writes.

File writes

type t

The type for file write operations.

val v_op : id:id -> mark:mark -> created:B0_std.Mtime.span -> ?post_exec:(op -> unit) -> ?k:(op -> unit) -> stamp:string -> reads:B0_std.Fpath.t list -> mode:int -> write:B0_std.Fpath.t -> (unit -> (string, string) Stdlib.result) -> op

write declares a file write operations, see the corresponding accessors for the semantics of the various arguments.

val v : stamp:string -> mode:int -> file:B0_std.Fpath.t -> data:(unit -> (string, string) Stdlib.result) -> t

v constructs a bare write operation.

val get : op -> t

geo o is the write o. Raises Invalid_argument if o is not a write.

val stamp : t -> string

stamp w is the file write stamp used for caching.

val mode : t -> int

int w is the mode of the file written by w.

val file : t -> B0_std.Fpath.t

file w is the file written by w.

val data : t -> (string, string) Stdlib.result

data w invokes and discards the write data function. If the write data function raises this is turned into an Error _.

val discard_data : t -> unit

discard_data w discards the write data function.


Innovation. Community. Security.