mirage/ocaml-tar

Name: ocaml-tar

Owner: MirageOS

Description: Pure OCaml library to read and write tar files

Created: 2012-03-22 17:38:47.0

Updated: 2017-08-17 14:19:28.0

Pushed: 2018-03-03 00:33:14.0

Homepage:

Size: 478

Language: OCaml

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

tar-format – decode and encode tar files

tar-format is a simple library to read and write tar files with an emphasis on streaming.

This is pure OCaml code, no C bindings.

Example toplevel session

In utop:

 # #require "tar";;
 # #require "tar.lwt";;

 # lwt f = Lwt_unix.openfile "/tmp/foo.tar" [ Unix.O_RDONLY ] 0 ;;
f : Lwt_unix.file_descr = <abstr> 

 # Tar_lwt_unix.Archive.list f;;
r_lwt_unix.Header.file_name = "_build/lib/tar.mli.depends";
r_lwt_unix.Header.file_mode = 420; Tar_lwt_unix.Header.user_id = 1000;
r_lwt_unix.Header.group_id = 1000; Tar_lwt_unix.Header.file_size = 21L;
r_lwt_unix.Header.mod_time = 1381080315L;
r_lwt_unix.Header.link_indicator = Tar_lwt_unix.Header.Link.Normal;
r_lwt_unix.Header.link_name = ""};
r_lwt_unix.Header.file_name = "_build/lib/tar_unix.mli.depends";
r_lwt_unix.Header.file_mode = 420; Tar_lwt_unix.Header.user_id = 1000;
r_lwt_unix.Header.group_id = 1000; Tar_lwt_unix.Header.file_size = 27L;
r_lwt_unix.Header.mod_time = 1381080318L;
r_lwt_unix.Header.link_indicator = Tar_lwt_unix.Header.Link.Normal;
r_lwt_unix.Header.link_name = ""};
r_lwt_unix.Header.file_name = "_build/lib/tar.mllib";
r_lwt_unix.Header.file_mode = ...; Tar_lwt_unix.Header.user_id = ...;
r_lwt_unix.Header.group_id = ...; Tar_lwt_unix.Header.file_size = ...;
r_lwt_unix.Header.mod_time = ...; Tar_lwt_unix.Header.link_indicator = ...;
r_lwt_unix.Header.link_name = ...};
]
Example users

This library is used by

Installation

tar-format can be installed with opam:

opam install tar-format

If you don't use opam consult the opam file for build instructions.

Documentation

Build Status

The documentation and API reference is automatically generated by ocamldoc from the interfaces. It can be consulted online.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.