package tar-eio

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

Utility functions for operating over whole tar archives

val with_next_file : Eio.Flow.source -> (Eio.Flow.source -> Tar.Header.t -> 'a) -> 'a option

Read the next header, apply the function 'f' to the source and the header. The function should leave the source positioned immediately after the datablock. Finally the function skips past the zero padding to the next header.

List the contents of a tar to stdout.

val extract : (string -> Eio.Fs.dir Eio.Path.t) -> Eio.Flow.source -> unit

extract dest extract the contents of a tar. Apply dest on each source filename to change the destination filename. It only supports extracting regular files from the top-level of the archive.

transform f src sink applies f to the header of each file in the tar inputted in src, and writes the resulting headers to sink preserving the content and structure of the archive.

val create : ?getpwuid:(int64 -> string) -> ?getgrgid:(int64 -> string) -> Eio.Fs.dir Eio.Path.t list -> Eio.Flow.sink -> unit

Create a tar in the sink from a list of file paths. It only supports regular files.

See header_of_file for the meaning of getpwuid and getgrgid.