package kaputt

  1. Overview
  2. Docs
type ('c, 'b, 'a) command constraint 'c = [< `Input | `No_input ] constraint 'b = [< `No_output | `Output ] constraint 'a = [< `Error | `No_error ]
type configuration = {
  1. pipe : string;
  2. redirect_output : string;
  3. redirect_append_output : string;
  4. redirect_error : string;
  5. redirect_append_error : string;
}
val bash : configuration
val set_configuration : configuration -> unit
val read_lines : string -> string list
val write_lines : string list -> string -> unit
val command : string -> ([< `Input | `No_input ], [< `No_output | `Output ], [< `Error | `No_error ]) command
val coerce : ([< `Input | `No_input ], [< `No_output | `Output ], [< `Error | `No_error ]) command -> ([< `Input | `No_input ], [< `No_output | `Output ], [< `Error | `No_error ]) command
val ignore : ([< `Input | `No_input ] as 'a, [< `No_output | `Output ], [< `Error | `No_error ]) command -> ('a, [ `No_output ], [ `No_error ]) command
val run : ([< `Input | `No_input ], [< `No_output | `Output ], [< `Error | `No_error ]) command -> int
val run_list : ([< `Input | `No_input ], [< `No_output | `Output ], [< `Error | `No_error ]) command list -> int
val file_exists : string -> bool
val is_directory : string -> bool
val getenv : string -> string
val files : string -> string list
val files_with_filter : (string -> bool) -> string -> string list
val files_with_suffix : string -> string -> string list
val current_dir_name : string
val parent_dir_name : string
val is_relative : string -> bool
val is_implicit : string -> bool
val check_suffix : string -> string -> bool
val chop_suffix : string -> string -> string
val chop_extension : string -> string
val basename : string -> string
val dirname : string -> string
val concatname : string -> string -> string
val temp_file : ?temp_dir:string -> string -> string -> string
val quote : string -> string
val pwd : unit -> string
val cd : string -> unit
val pushd : string -> unit
val popd : unit -> string
val exit : int -> ([ `No_input ], [ `No_output ], [ `No_error ]) command
val pwdir : unit -> ([ `No_input ], [ `Output ], [ `No_error ]) command
val chdir : string -> ([ `No_input ], [ `No_output ], [ `Error ]) command
val mkdir : ?options:string list -> string -> ([ `No_input ], [ `No_output ], [ `Error ]) command
val rmdir : ?options:string list -> string -> ([ `No_input ], [ `No_output ], [ `Error ]) command
val ls : ?options:string list -> string list -> ([ `No_input ], [ `Output ], [ `Error ]) command
val cp : ?options:string list -> string list -> string -> ([ `No_input ], [ `No_output ], [ `Error ]) command
val rm : ?options:string list -> string list -> ([ `No_input ], [ `No_output ], [ `Error ]) command
val mv : ?options:string list -> string list -> string -> ([ `No_input ], [ `No_output ], [ `Error ]) command
val touch : ?options:string list -> string list -> ([ `No_input ], [ `No_output ], [ `Error ]) command
val cat : ?options:string list -> string list -> ([ `No_input ], [ `Output ], [ `Error ]) command
val echo : ?options:string list -> string -> ([ `No_input ], [ `Output ], [ `Error ]) command
val diff : ?options:string list -> string -> string -> ([ `No_input ], [ `Output ], [ `Error ]) command
val grep : ?options:string list -> string -> ([ `Input ], [ `Output ], [ `Error ]) command
val grep_files : ?options:string list -> string -> string list -> ([ `No_input ], [ `Output ], [ `Error ]) command
val sed : ?options:string list -> string -> ([ `Input ], [ `Output ], [ `Error ]) command
val sort : ?options:string list -> string list -> ([ `Input ], [ `Output ], [ `Error ]) command
val cut : ?options:string list -> string list -> ([ `Input ], [ `Output ], [ `Error ]) command
val sleep : int -> ([ `No_input ], [ `No_output ], [ `No_error ]) command
val pipe : ([< `Input | `No_input ] as 'a, [ `Output ], [< `Error | `No_error ]) command -> ([ `Input ], [< `No_output | `Output ] as 'b, [< `Error | `No_error ] as 'c) command -> ('a, 'b, 'c) command
val (|>) : ([< `Input | `No_input ] as 'a, [ `Output ], [< `Error | `No_error ]) command -> ([ `Input ], [< `No_output | `Output ] as 'b, [< `Error | `No_error ] as 'c) command -> ('a, 'b, 'c) command
val redirect_output : ([< `Input | `No_input ] as 'a, [ `Output ], [< `Error | `No_error ] as 'b) command -> string -> ('a, [ `No_output ], 'b) command
val (>>) : ([< `Input | `No_input ] as 'a, [ `Output ], [< `Error | `No_error ] as 'b) command -> string -> ('a, [ `No_output ], 'b) command
val redirect_append : ([< `Input | `No_input ] as 'a, [ `Output ], [< `Error | `No_error ] as 'b) command -> string -> ('a, [ `No_output ], 'b) command
val (>>>) : ([< `Input | `No_input ] as 'a, [ `Output ], [< `Error | `No_error ] as 'b) command -> string -> ('a, [ `No_output ], 'b) command
val redirect_error : ([< `Input | `No_input ] as 'a, [< `No_output | `Output ] as 'b, [ `Error ]) command -> string -> ('a, 'b, [ `No_error ]) command
val (>>>>) : ([< `Input | `No_input ] as 'a, [< `No_output | `Output ] as 'b, [ `Error ]) command -> string -> ('a, 'b, [ `No_error ]) command
val redirect_append_error : ([< `Input | `No_input ] as 'a, [< `No_output | `Output ] as 'b, [ `Error ]) command -> string -> ('a, 'b, [ `No_error ]) command
val (>>>>>) : ([< `Input | `No_input ] as 'a, [< `No_output | `Output ] as 'b, [ `Error ]) command -> string -> ('a, 'b, [ `No_error ]) command
OCaml

Innovation. Community. Security.