package tar-unix

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Unix I/O for tar-formatted data.

val really_read : Unix.file_descr -> Cstruct.t -> unit

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

val really_write : Unix.file_descr -> Cstruct.t -> unit

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

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

Returns the next header block or throws End_of_stream 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 header_of_file : ?level:Tar.Header.compatibility -> string -> Tar.Header.t

Return the header needed for a particular file on disk.

val write_block : ?level:Tar.Header.compatibility -> Tar.Header.t -> (Unix.file_descr -> unit) -> Unix.file_descr -> 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 in favor of Tar.HeaderWriter
val write_end : Unix.file_descr -> unit

Write a stream terminator to fd.

  • deprecated Deprecated in favor of Tar.HeaderWriter
module Archive : sig ... end

Utility functions for operating over whole tar archives.

OCaml

Innovation. Community. Security.