Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
hannesm committed Feb 3, 2024
1 parent 01da19e commit 9b4214e
Showing 1 changed file with 12 additions and 14 deletions.
26 changes: 12 additions & 14 deletions unix/tar_unix.mli
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,18 @@

(** Unix I/O for tar-formatted data. *)

val really_read: Unix.file_descr -> bytes -> unit
(** [really_read fd buf] fills [buf] with data from [fd] or raises
{!Stdlib.End_of_file}. *)

val really_write: Unix.file_descr -> string -> unit
(** [really_write fd buf] writes the full contents of [buf] to [fd]
or {!Stdlib.End_of_file}. *)

val skip : Unix.file_descr -> int -> unit
(** [skip fd n] reads [n] bytes from [fd] and discards them. If possible, you
should use [Unix.lseek fd n Unix.SEEK_CUR] instead. *)

(** Return the header needed for a particular file on disk. *)
val header_of_file : ?level:Tar.Header.compatibility -> string -> Tar.Header.t

module HeaderReader : Tar.HEADERREADER with type in_channel = Unix.file_descr and type 'a io = 'a
module HeaderWriter : Tar.HEADERWRITER with type out_channel = Unix.file_descr and type 'a io = 'a
(** Fold over a tar archive. *)
val fold_tar :
((Tar.Header.t * Tar.Header.Extended.t option,
[
| `Eof
| `Fatal of [ `Checksum_mismatch | `Corrupt_pax_header | `Unmarshal of string ]
| `Unix of Unix.error
]) result -> 'a -> 'a) ->
Unix.file_descr ->
'a -> 'a

val append_file : ?header:Tar.Header.t -> string ->

0 comments on commit 9b4214e

Please sign in to comment.