package febusy

  1. Overview
  2. Docs

Module Edsl.SystemSource

Useful functions to deal with the operating system.

Sourceval home : unit -> string

The value of "$HOME".

Sourceval cmdf : ?in_dir:string -> ?silent:bool -> ('a, unit, string, unit) format4 -> 'a

Run a shell command (wrapper around Sys.command which throws an exception when the return value is non-zero).

Sourceval cmd_to_string_list : string -> string list

Run a shell command and get the output as a list of strings.

Sourceval feed_cmd : string -> string -> unit

Feed a string as stdin of a shell command.

Sourceval write_lines : string -> string list -> unit

Write lines into a given file path.

Sourceval read_lines : string -> string list

Read a file as a list of strings.