package coq-core
Install
Dune Dependency
Authors
Maintainers
Sources
md5=66e57ea55275903bef74d5bf36fbe0f1
sha512=1a7eac6e2f58724a3f9d68bbb321e4cfe963ba1a5551b9b011db4b3f559c79be433d810ff262593d753770ee41ea68fbd6a60daa1e2319ea00dff64c8851d70b
doc/coq-core.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.