package git

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Parameters

module E : ENCODER
module FS : sig ... end

Signature

type error = [
  1. | `Encoder of E.error
  2. | FS.error Error.FS.t
]
val to_file : ?limit:int -> ?atomic:bool -> FS.t -> temp_dir:Fpath.t -> Fpath.t -> Cstruct.t -> E.state -> (E.result, error) result Lwt.t

to_file t f tmp state encodes state in the file f using tmp as an intermediary buffer.

The result is Error `Stack if at least limit writes have returned 0.

If atomic is set, the operation is guaranteed to be atomic.

OCaml

Innovation. Community. Security.