package tar-eio

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

I/O for tar-formatted data

type t
val value : ('a, 'err) Stdlib.result -> ('a, 'err, t) Tar.t
val run_read_only : ('a, [> `Unexpected_end_of_file ] as 'b, t) Tar.t -> [> `R ] Eio.Flow.source -> ('a, 'b) Stdlib.result
val fold : (?global:Tar.Header.Extended.t -> Tar.Header.t -> 'a -> ('a, [> `Fatal of Tar.error | `Unexpected_end_of_file ] as 'b, t) Tar.t) -> Eio.Fs.dir_ty Eio.Path.t -> 'a -> ('a, 'b) Stdlib.result
val header_of_file : ?level:Tar.Header.compatibility -> ?getpwuid:(int64 -> string) -> ?getgrgid:(int64 -> string) -> Eio.Fs.dir_ty Eio.Path.t -> Tar.Header.t

Return the header needed for a particular file on disk. getpwuid and getgrgid are optional functions that should take the uid and gid respectively and return the passwd and group entry names for each. These will be added to the header.

val extract : ?filter:(Tar.Header.t -> bool) -> src:Eio.Fs.dir_ty Eio.Path.t -> Eio.Fs.dir_ty Eio.Path.t -> (unit, _) Stdlib.result
val create : ?level:Tar.Header.compatibility -> ?global:Tar.Header.Extended.t -> ?filter:(Tar.Header.t -> bool) -> src:Eio.Fs.dir_ty Eio.Path.t -> Eio.Fs.dir_ty Eio.Path.t -> (unit, _) Stdlib.result
val append_file : ?level:Tar.Header.compatibility -> ?header:Tar.Header.t -> Eio.Fs.dir_ty Eio.Path.t -> [> `W ] Eio.Flow.sink -> (unit, _) Stdlib.result
val write_header : ?level:Tar.Header.compatibility -> Tar.Header.t -> [> `W ] Eio.Flow.sink -> (unit, _) Stdlib.result
val write_global_extended_header : ?level:Tar.Header.compatibility -> Tar.Header.Extended.t -> [> `W ] Eio.Flow.sink -> (unit, _) Stdlib.result
val write_end : [> `W ] Eio.Flow.sink -> (unit, _) Stdlib.result
OCaml

Innovation. Community. Security.