Topkg_care.ArchiveArchive file creation.
val tar :
Fpath.t ->
exclude_paths:Fpath.set ->
root:Fpath.t ->
mtime:int ->
(string, Bos_setup.R.msg) Bos_setup.resulttar dir ~exclude_paths ~root ~mtime is a (us)tar archive that contains the file hierarchy dir except the relative hierarchies present in exclude_paths. In the archive, members of dir are rerooted at root and sorted according to Fpath.compare. They have their modification time set to mtime and their file permissions are 0o775 for directories and files executable by the user and 0o664 for other files. No other file metadata is preserved.
Note. This is a pure OCaml implementation, no tar tool is needed.
ensure_bzip2 () makes sure the bzip2 utility is available.
bzip2 s dst compresses s to dst using bzip2.
ensure_tar () makes sure the tar utility is available.