package rocq-runtime
Install
Dune Dependency
Authors
Maintainers
Sources
md5=8d522602d23e7a665631826dab9aa92b
sha512=f4f76a6a178e421c99ee7a331a2fd97a06e9c5d0168d7e60c44e3820d8e1a124370ea104ad90c7f87a9a1e9d87b2d0d7d2d387c998feeaed4a75ed04e176a4be
doc/rocq-runtime.clib/CUnix/index.html
Module CUnix
Source
System utilities
Escape what has to be escaped (e.g. surround with quotes if with spaces)
Remove all initial "./" in a path
If a path p
starts with the current directory $PWD then strip_path p
returns the sub-path relative to $PWD. Any leading "./" are also removed from the result.
correct_path f dir = dir/f if f is relative
make_suffix file suf
catenate file
with suf
when file
does not already end with suf
.
Executing commands
run_command com
launches command com
, and returns the contents of stdout and stderr. If given, ~hook
is called on each elements read on stdout or stderr.
sys_command
launches program prog
with arguments args
. It behaves like Sys.command
, except that we rely on Unix.create_process
, it's hardly more complex and avoids dealing with shells. In particular, no need to quote arguments (against whitespace or other funny chars in paths), hence no need to care about the different quoting conventions of /bin/sh and cmd.exe.
A version of Unix.waitpid
immune to EINTR exceptions
Check if two file names refer to the same (existing) file
Like Stdlib.Filename.temp_file
but producing a directory.