package tar-format

  1. Overview
  2. Docs

Utility functions for operating over whole tar archives

val with_next_file : Unix.file_descr -> (Unix.file_descr -> Header.t -> 'a) -> 'a

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

val list : ?level:Header.compatibility -> Unix.file_descr -> Header.t list

List the contents of a tar

val extract : (string -> string) -> Unix.file_descr -> unit

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

val create : string list -> Unix.file_descr -> unit

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

val copy_n : Unix.file_descr -> Unix.file_descr -> int64 -> unit

This function is DEPRECATED. copy_n ifd odf n copies exactly n bytes from ifd to ofd

val multicast_n : ?buffer_size:int -> Unix.file_descr -> Unix.file_descr list -> int64 -> unit

This function is DEPRECATED. multicast_n ?buffer_size ifd ofds n copies exactly n bytes from ifd to all ofds

val multicast_n_string : string -> Unix.file_descr list -> int -> unit

This function is DEPRECATED. multicast_n_string buffer ofds n copies n bytes from buffer to all ofds

val skip : Unix.file_descr -> int -> unit

This function is DEPRECATED. skip fd n reads and throws away n bytes from fd