Frama_c_kernel.CommandUseful high-level system operations.
val pp_to_file : Filepath.t -> (Format.formatter -> unit) -> unitval bincopy : bytes -> in_channel -> out_channel -> unitval copy : Filepath.t -> Filepath.t -> unitval read_file : Filepath.t -> (in_channel -> 'a) -> 'aval read_lines : Filepath.t -> (string -> unit) -> unitval write_file : Filepath.t -> (out_channel -> 'a) -> 'aval print_file : Filepath.t -> (Format.formatter -> 'a) -> 'aval pp_from_file : Format.formatter -> Filepath.t -> unitpp_from_file fmt file dumps the content of file into the fmt. Exceptions in pp are re-raised after closing.
type timer = float refCompute the elapsed time with Sys.time. The rmax timer is maximized and the radd timer is cumulated. Computed result is returned, or exception is re-raised.
val full_command :
string ->
string array ->
stdin:Unix.file_descr ->
stdout:Unix.file_descr ->
stderr:Unix.file_descr ->
Unix.process_statustype process_result = | Not_ready of unit -> unit| Result of Unix.process_statusNot_ready f means that the child process is not yet finished and may be terminated manually with f ().
val full_command_async :
string ->
string array ->
stdin:Unix.file_descr ->
stdout:Unix.file_descr ->
stderr:Unix.file_descr ->
unit ->
process_resultval async :
?stdout:Buffer.t ->
?stderr:Buffer.t ->
string ->
string list ->
unit ->
process_resultSame arguments as Unix.create_process.
val command_async :
?stdout:Buffer.t ->
?stderr:Buffer.t ->
string ->
string list ->
unit ->
process_resultval spawn :
?timeout:int ->
?stdout:Buffer.t ->
?stderr:Buffer.t ->
string ->
string list ->
Unix.process_statusSame arguments as Unix.create_process. When this function returns, the stdout and stderr of the child process will be filled into the arguments buffer.
val command :
?timeout:int ->
?stdout:Buffer.t ->
?stderr:Buffer.t ->
string ->
string list ->
Unix.process_status