package tar-format

  1. Overview
  2. Docs

Utility functions for operating over whole tar archives

val with_next_file : Lwt_unix.file_descr -> (Lwt_unix.file_descr -> Header.t -> 'a Lwt.t) -> 'a option Lwt.t

Read the next header, apply the function 'f' to the fd and the header. The function should leave the fd positioned immediately after the datablock. Finally the function skips past the zero padding to the next header

List the contents of a tar to stdout

val extract : (string -> string) -> Lwt_unix.file_descr -> unit Lwt.t

extract dest extract the contents of a tar. Apply 'dest' on each source filename to know the destination filename

val create : string list -> Lwt_unix.file_descr -> unit Lwt.t

Create a tar on file descriptor fd from the filename list 'files'