Merge commit 'ocaml3102'
[ocaml.git] / ocamlbuild / my_unix.mli
blob9adf1483a81b8dbf303630e36eadee46e6211cb6
1 (***********************************************************************)
2 (* ocamlbuild *)
3 (* *)
4 (* Nicolas Pouillard, Berke Durak, projet Gallium, INRIA Rocquencourt *)
5 (* *)
6 (* Copyright 2007 Institut National de Recherche en Informatique et *)
7 (* en Automatique. All rights reserved. This file is distributed *)
8 (* under the terms of the Q Public License version 1.0. *)
9 (* *)
10 (***********************************************************************)
12 (* $Id$ *)
13 (* Original author: Nicolas Pouillard *)
14 type file_kind =
15 | FK_dir
16 | FK_file
17 | FK_link
18 | FK_other
20 type stats =
22 stat_file_kind : file_kind;
23 stat_key : string
26 val is_degraded : bool Lazy.t
28 val is_link : string -> bool
29 val run_and_open : string -> (in_channel -> 'a) -> 'a
30 val readlink : string -> string
31 val run_and_read : string -> string
33 (** See [Ocamlbuild_executor.execute] *)
34 val execute_many :
35 ?max_jobs:int ->
36 ?ticker:(unit -> unit) ->
37 ?period:float ->
38 ?display:((out_channel -> unit) -> unit) ->
39 ((unit -> string) list list) ->
40 (bool list * exn) option
42 val report_error : Format.formatter -> exn -> unit
43 val at_exit_once : (unit -> unit) -> unit
45 val gettimeofday : unit -> float
47 val stdout_isatty : unit -> bool
49 val stat : string -> stats
50 val lstat : string -> stats
52 (** internal usage only *)
53 type implem =
55 mutable is_degraded : bool;
56 mutable is_link : string -> bool;
57 mutable run_and_open : 'a . string -> (in_channel -> 'a) -> 'a;
58 mutable readlink : string -> string;
59 mutable execute_many : ?max_jobs:int ->
60 ?ticker:(unit -> unit) ->
61 ?period:float ->
62 ?display:((out_channel -> unit) -> unit) ->
63 ((unit -> string) list list) ->
64 (bool list * exn) option;
65 mutable report_error : Format.formatter -> exn -> unit;
66 mutable at_exit_once : (unit -> unit) -> unit;
67 mutable gettimeofday : unit -> float;
68 mutable stdout_isatty : unit -> bool;
69 mutable stat : string -> stats;
70 mutable lstat : string -> stats;
73 val implem : implem