# CL-TAR Project

###### [in package CL-TAR-SITE]

The CL-TAR project works on making tar files readable and writeable directly from Common Lisp, without shelling out to a tar executable. There are two sub projects under the CL-TAR umbrella.

The first is cl-tar-file. It defines a single ASDF system: tar-file. This project focuses on reading and writing physical tar file entries. It is a rather low-level library and it is expected that not many projects will use it directly.

The second is cl-tar. It defines several ASDF systems meant for use by other developers: tar, tar-simple-extract, and tar-extract. This project is a high level interface built on top of cl-tar-file. It reads and writes logical entries from/to tar files. Additionally, it contains code to interface with your file system.

## Quickstart

You likely want to use cl-tar instead of cl-tar-file directly. Load it with:

(asdf:load-system :tar)

If you want to extract a tar archive on any CL implementation, without preserving all the metadata or symbolic links, run the following:

(asdf:load-system :tar-simple-extract)

(tar:with-open-archive (a "/path/to/file.tar")
(tar-simple-extract:simple-extract-archive a :directory #p"/path/to/extraction/point/"))

If you want to extract a tar archive, attempting to preserve symbolic links and as much metadata as possible, evaluate the following. Note that this requires osicat to work on your OS and implementation. Additionally, you need a version of osicat with commits from this PR.

(asdf:load-system :tar-extract)

(tar:with-open-archive (a "/path/to/file.tar")
(tar-extract:extract-archive a :directory #p"/path/to/extraction/point/"))

## cl-tar

The cl-tar repository is located at https://gitlab.common-lisp.net/cl-tar/cl-tar

The latest cl-tar release is v0.1.1, and the manual is here

The manuals for all releases of cl-tar can be found below:

## cl-tar-file

The cl-tar-file repository is located at https://gitlab.common-lisp.net/cl-tar/cl-tar-file

The latest cl-tar-file release is v0.1.2, and the manual is here

The manuals for all releases of cl-tar-file can be found below: