package topkg-care

  1. Overview
  2. Docs
The transitory OCaml software packager

Install

Dune Dependency

Authors

Maintainers

Sources

topkg-1.0.8.tbz
sha512=4b632b60137852bb72ff9c8cdc2e16ac5ece6473569e50963fef9c1e800a0933a516bea1107b04011645afa4a1e78893c82dbce0aa8de2970d4d6c6d0dd2fe02

doc/topkg_care/Topkg_care/Archive/index.html

Module Topkg_care.Archive

Archive file creation.

Ustar archives

val tar : Fpath.t -> exclude_paths:Fpath.set -> root:Fpath.t -> mtime:int -> (string, Bos_setup.R.msg) Bos_setup.result

tar 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.

Bzip2 compression and unarchiving

val ensure_bzip2 : unit -> (unit, Bos_setup.R.msg) Bos_setup.result

ensure_bzip2 () makes sure the bzip2 utility is available.

val bzip2 : string -> dst:Fpath.t -> (unit, Bos_setup.R.msg) Bos_setup.result

bzip2 s dst compresses s to dst using bzip2.

val ensure_tar : unit -> (unit, Bos_setup.R.msg) Bos_setup.result

ensure_tar () makes sure the tar utility is available.

val untbz : ?clean:bool -> Fpath.t -> (Fpath.t, Bos_setup.R.msg) Bos_setup.result

untbz ~clean ar untars the tar bzip2 archive ar in the same directory as ar and returns a base directory for ar. If clean is true (defaults to false) first delete the base directory if it exists.

OCaml

Innovation. Community. Security.