package tar

  1. Overview
  2. Docs

Module Tar_cstructSource

Processing tar content with cstruct buffers

Sourcetype in_channel
Sourcetype out_channel
Sourceval make_in_channel : Cstruct.t -> in_channel

make_in_channel buf uses buf as a source of raw tar content.

Sourceval make_out_channel : unit -> out_channel

make_out_channel () returns a buffer to hold serialized tar content.

Sourceval to_string : out_channel -> string

to_string oc returns the contents of oc as a string of bytes.

Sourceval to_cstruct : out_channel -> Cstruct.t

to_cstruct oc returns the contents of oc as a Cstruct.t.

Sourceval really_read : in_channel -> Cstruct.t -> unit

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

Sourceval really_write : out_channel -> Cstruct.t -> unit

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

Sourceval get_next_header : ?level:Tar.Header.compatibility -> in_channel -> Tar.Header.t

get_next_header ?level ic returns the next header block or fails with `Eof if two consecutive zero-filled blocks are discovered. Assumes ic is positioned at the possible start of a header block.

Sourcemodule Archive : sig ... end