package tar

  1. Overview
  2. Docs

Parameters

module IO : IO

Signature

val really_read : IO.in_channel -> Cstruct.t -> unit

really_read fd buf fills buf with data from fd or raises Stdlib.End_of_file.

val really_write : IO.out_channel -> Cstruct.t -> unit

really_write fd buf writes the full contents of buf to fd or raises Stdlib.End_of_file.

val get_next_header : ?level:Header.compatibility -> IO.in_channel -> Header.t

Returns the next header block or fails with `Eof if two consecutive zero-filled blocks are discovered. Assumes stream is positioned at the possible start of a header block.

  • raises Stdlib.End_of_file

    if the stream unexpectedly fails.

val write_block : ?level:Header.compatibility -> Header.t -> (IO.out_channel -> unit) -> IO.out_channel -> unit

Write hdr, then call write_body fd to write the body, then zero-pads so the stream is positioned for the next block.

  • deprecated Deprecated: use Tar.HeaderWriter
val write_end : IO.out_channel -> unit

Writes a stream terminator to fd.

  • deprecated Deprecated: use Tar.HeaderWriter
module Archive : sig ... end

Utility functions for operating over whole tar archives.