package tar-unix

  1. Overview
  2. Docs
Module type
Class type

Lwt_unix I/O for tar-formatted data

val really_read : Lwt_unix.file_descr -> Cstruct.t -> unit Lwt.t

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

val really_write : Lwt_unix.file_descr -> Cstruct.t -> unit Lwt.t

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

val get_next_header : ?level:Tar.Header.compatibility -> Lwt_unix.file_descr -> Tar.Header.t option Lwt.t

Returns the next header block or None 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 Lwt.t

Return the header needed for a particular file on disk.

module Archive : sig ... end

Utility functions for operating over whole tar archives