package core_unix

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

Structure of entries in the passwd database

type t = {
  1. name : string;
  2. passwd : string;
  3. uid : int;
  4. gid : int;
  5. gecos : string;
  6. dir : string;
  7. shell : string;
}
include Ppx_compare_lib.Comparable.S with type t := t
val compare : t Base__Ppx_compare_lib.compare
val shell : t -> string
val dir : t -> string
val gecos : t -> string
val gid : t -> int
val uid : t -> int
val passwd : t -> string
val name : t -> string
include Sexplib0.Sexpable.S with type t := t
val t_of_sexp : Sexplib0__.Sexp.t -> t
val sexp_of_t : t -> Sexplib0__.Sexp.t
val getbyname : string -> t option
val getbyname_exn : string -> t
val getbyuid : int -> t option
val getbyuid_exn : int -> t
val getpwents : unit -> t list

getpwents is a thread-safe wrapper over the low-level passwd database functions. The order in which the results are returned is not deterministic.

module Low_level : sig ... end

These functions may not be thread safe. Use getpwents, above, if possible.

OCaml

Innovation. Community. Security.