package tezos-stdlib-unix

  1. Overview
  2. Docs
val default_net_timeout : Ptime.Span.t ref

default_net_timeout is the default timeout used by functions in this library which admit a timeout value, i.e. read_bytes, Socket.connect, Socket.recv.

val read_bytes : ?timeout:Ptime.Span.t -> ?pos:int -> ?len:int -> Lwt_unix.file_descr -> bytes -> unit Lwt.t

read_bytes ?timeout ?pos ?len fd buf reads len-pos bytes from fd into bytes.

  • raises Lwt_unix.Timeout

    if the operation failed to finish within a timeout time span.

val write_string : ?pos:int -> ?len:int -> Lwt_unix.file_descr -> string -> unit Lwt.t
val write_bytes : ?pos:int -> ?len:int -> Lwt_unix.file_descr -> Bytes.t -> unit Lwt.t
val remove_dir : string -> unit Lwt.t
val create_dir : ?perm:int -> string -> unit Lwt.t
val read_file : string -> string Lwt.t
val create_file : ?perm:int -> string -> string -> int Lwt.t
val with_tempdir : string -> (string -> 'a Lwt.t) -> 'a Lwt.t
val safe_close : Lwt_unix.file_descr -> unit Lwt.t
val getaddrinfo : passive:bool -> node:string -> service:string -> (Ipaddr.V6.t * int) list Lwt.t
val getpass : unit -> string

getpass () reads a password from stdio while setting-up the terminal to not display the password being typed.

module Json : sig ... end
module Socket : sig ... end
val retry : ?log:('error -> unit Lwt.t) -> ?n:int -> ?sleep:float -> (unit -> ('a, 'error) result Lwt.t) -> ('a, 'error) result Lwt.t