Tar¶
This project provides a high level interface for interacting with tar archives. It consists of several systems that provide different levels of functionality.
NOTE: In order to load tar/create on Windows you need a version of osicat
with commits from this PR.
Quickstart
If you want to extract a tar archive, without caring about preserving all the metadata, 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 "/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:
(asdf:load-system "tar/extract")
(tar:with-open-archive (a "/path/to/file.tar")
  (tar-extract:extract-archive a :directory "/path/to/extraction/point/"))If you want to create a tar archive, attempting to preserve symbolic links and as much metadata as possible, evaluate the following:
(asdf:load-system "tar/create")
(let ((*default-pathname-defaults* #p"/path/to/parent/"))
  (tar:with-open-archive (a "/path/to/file.tar" :direction :output)
    (tar-create:create-archive a '("directory/") :recursep t)))Systems
tar
The tar system is a thin layer on top of
the tar-file
system. While tar-file is focused on reading and writing physical entries,
tar places an emphasis on reading and writing logical entries.
The practical effect of this is that when using tar, any single object stored
in a tar archive (regular file, symlink, etc.) is always represented as a
single entry (tar:file-entry, tar:symbolic-link-entry, etc.). This is in
contrast to tar-file where a regular file with a long name could be either
unrepresentable, a single tar-file:file-entry with a ustar header, a
tar-file:pax-extended-attributes-entry followed by a tar-file:file-entry,
or a tar-file:gnu-long-name-entry followed by a tar-file:file-entry. tar
takes care of generating and interpreting the correct sequence of physical
entries, depending on the type of the archive being used.
While this system is useful for reading and writing tar archives, its primary purpose is for the inspection of archives and creating archives whose content does not come directly from the file system. For file system integration, see the remaining systems.
tar/simple-extract
The tar/simple-extract system provides functionality to extract a tar archive
to your filesystem. Unfortunately, faithfully extracting tar files onto the
filesystem is a complex task and is impossible to perform using only the
functionality mandated by the Common Lisp specification.
Therefore, this system does not try to faithfully reproduce the contents of the
tar file. This means that it should work on any CL implementation that tar
and tar-file does, but the cost is there is information loss.
This system does not support extracting the following entry types:
- Symbolic links. They can be skipped or dereferenced. 
- Hard links. They can be skipped or dereferenced. 
- Character devices. They can be skipped. 
- Block devices. They can be skipped. 
- FIFO. They can be skipped.
Additionally, metadata such as file owner, permissions, and modification time are not set.
It is recommended that this extraction method is used only to extract an archive to an empty folder. If that is done with default settings, the extraction process should be fairly safe and predictable. Otherwise, you run the risk of existing symlinks being followed and overwriting arbitrary files on your machine.
tar/extract
The tar/extract system attempts to provide full extraction functionality. As
such, it is a much more complex beast and likely does not work on all
implementation/OS combinations. Patches are always welcome to make it more
portable.
This system does not support extracting the following entry types on Windows:
- Symbolic links. They can be skipped or dereferenced. 
- Hard links. They can be skipped or dereferenced. 
- Character devices. They can be skipped. 
- Block devices. They can be skipped. 
- FIFO. They can be skipped.
While it is possible to create symbolic links on Windows, it requires special user permissions and many Windows applications are not designed with symlinks in mind. This makes it both very unlikely that an arbitrary user can create symlinks and very likely that the creation of symlinks would pose a risk to other applications running on the same machine. Hard link support is also possible, but I've rarely seen it and need to do more research before attempting to support it.
While there is much less information loss when extracting an archive using this system, that comes at the cost of increased security concerns when given an untrusted archive as input. For example, a typical attack vector is to write a symlink that points to an arbitrary file on your system and then using that symlink to modify the target.
The goal of this system is to provide default extraction options so that it is safe to extract an untrusted archive into an empty directory and have no way for the extraction process to modify any file that exists outside of that directory. Bug reports and patches are always welcome if you find this goal is not met.
The safety goal is paramount, and as such, the performance of this system is likely not the best. A primary reason is that we want to be robust to the different file systems that are out there (e.g., case insensitive or unicode normalizing), so we (currently) do not rely on caches to determine if a path is safe to write to. The result is that there are many syscalls that happen during extraction. There are probably ways this can be improved and patches are always welcome.
tar/create
The tar/create system produces a tar file from your file system that
faithfully reproduces all the metadata. It is a fairly complex beast and might
not work on all implementation/OS combinations. Patches are always welcome to
make it more portable.
See the docstring for tar-create:create-archive to understand its options.
FAQ
Can I create/extract compressed tar files?
Yes! It supports transparent gzip comporession. On input streams, the first few
bytes are examined for magic bytes. On output streams, the pathname is used as
a hint. You can override this behavior using the :compression argument to
with-open-archive or open-archive.
Tar¶
This section describes the high level tar archive support.
Tar Archives¶
- 
         [class]
        The base class of all archives. 
- 
       
         [class]
        An archive that uses GNUspecific extensions.
- 
       
         [class]
        An archive as specified by POSIX. Uses multiple physical entries to represent a single logical entry when values do not fit into the standardustar-archiveheader.
- 
       
         [class]
        A ustar archive that adds more fields to the header when compared to v7-archives.
- 
       
         [class]
        A very early archive format. 
- 
       
         [function]
        stream-or-path &key (type :auto) (direction :input) 
        (if-exists nil if-exists-supplied-p) (if-does-not-exist nil 
        if-does-not-exist-supplied-p) (blocking-factor 20) (compression :auto) 
        (header-encoding tar-file:\*default-header-encoding\*)Create a tar archive object backed by STREAM-OR-PATH. If a stream, it should not be read from or written to any more.DIRECTIONis either:INPUTor:OUTPUT.BLOCKING-FACTORis an integer that specifies how many 512-byte blocks should be read from or written toSTREAMat any one time.TYPEis eitherAUTOor a class designator for a subclass ofarchive. If:AUTO, the appropriate class will be determined by looking at the first tar header.HEADER-ENCODINGis an encoding specifier recognized by Babel.COMPRESSIONdetermines what compression scheme is used, if any. It can be either:AUTO(the default),NIL(no compression), or:GZIP. If:AUTO, the compression type is determined using thePATHNAMEof the stream (for:OUTPUT) or by peeking at the stream for magic numbers (for:INPUT).
- 
         [generic-function]
        archiveClose the ARCHIVE, performing any finalization as necessary. If a pathname was passed toopen-archive, then the underlying stream is closed, otherwise it remains open.
- 
      
         [macro]
        (archive-var stream-or-path &rest args &key type 
        direction if-exists if-does-not-exist blocking-factor header-encoding 
        compression) &body bodyEvaluate BODYwithARCHIVE-VARbound to an instance ofarchive. Seeopen-archivefor more discussion of the arguments. IfSTREAM-OR-PATHis a path, the underlying stream is closed upon exiting the macro. If it is a stream, it remains open.
Tar Entries¶
This section describes the various entry types and how to read/write them from/to an archive.
- 
         [generic-function]
        archiveRead an entryfromARCHIVE.
- 
         [generic-function]
        archive entryWrite ENTRYtoARCHIVE.
- 
      
         [macro]
        (entry archive &optional result) &body bodyIterate over the entries in archive. For each entry,entryis bound to anentryrepresenting the entry.RESULTis returned.
- 
       [type]
        A list consisting of a subset of: ( :SET-USER-ID:SET-GROUP-ID:STICKY:USER-READ:USER-WRITE:USER-EXEC:GROUP-READ:GROUP-WRITE:GROUP-EXEC:OTHER-READ:OTHER-WRITE:OTHER-EXEC)
- [class]
        The base class of all entry types. Each entrymust contain aname,mode,uid,gid, andmtime. Other common properties areuname,gname,atime, andctime.
- 
       
         [class]
        An entry representing a directory. 
- 
       
         [class]
        An entry representing a regular file. 
- 
         [class]
        An entry representing a symbolic link. 
- 
       
         [class]
        An entry representing a hard link. 
- 
       
         [class]
        An entry representing a FIFO.
- 
         [class]
        An entry representing a block device. 
- 
         [class]
        An entry representing a character device. 
- 
       
         [generic-function]
        entryThe name of ENTRY. Returns aSTRING.
- 
       
         [generic-function]
        entryThe size of ENTRY. Returns a (INTEGER0).
- 
         [generic-function]
        entryThe uname of ENTRY. Returns aSTRING.
- 
         [generic-function]
        entryThe gname of ENTRY. Returns aSTRING.
- 
       
         [generic-function]
        entryThe mode of ENTRY. Returns amode-list.
- 
         [generic-function]
        entryThe mtime of ENTRY. Returns aTIMESTAMP.
- 
         [generic-function]
        entryThe atime of ENTRY. Returns aTIMESTAMP.
- 
         [generic-function]
        entryThe ctime of ENTRY. Returns aTIMESTAMP.
- 
       
         [generic-function]
        entryThe uid of ENTRY. Returns a (INTEGER0).
- 
       
         [generic-function]
        entryThe gid of ENTRY. Returns a (INTEGER0).
- 
         [generic-function]
        entryThe linkname of ENTRY. Returns aSTRING.
- 
         [generic-function]
        entryThe devmajor of ENTRY. Returns a (INTEGER0).
- 
         [generic-function]
        entryThe devminor of ENTRY. Returns a (INTEGER0).
- 
         [generic-function]
        entryReturn a binary stream with the contents of ENTRY. Depending on the the type of stream underlying the archive (if it is seekable or not) and theBLOCKING-FACTORgiven toopen-archive, this may be callable either once or multiple times per entry, may or may not be callable after the next call toread-entry, and the the returned stream may or may not be readable after the next call toread-entry.For maximum compatibility, you should call this only once per ENTRYand completely read from the stream before callingread-entryagain.
Tar Conditions¶
This section describes the various conditions and restarts in the tar system.
- 
         [condition]
        The base condition. 
- 
       
         [condition]
        The base error condition. 
- 
         [condition]
        Signaled when a property is set or accessed that the underlying tar file cannot represent. 
- 
         [condition]
        Signaled when trying to write-entrywith a required property that is missing.
- [reader] (:name)
- 
         [condition]
        Signaled when trying to write-entrywith a property that is unsupported by the underlying archive type.
- [reader] (:name)
- [reader] (:value)
- 
         [condition]
        Signaled when trying to write-entrywith a property that is too long for the underlying archive type.
- 
         [function]
        &optional value conditionA restart to ignore an unsupported-propertyCONDITION. Either returnsVALUEfrom the accessor or silently ignores the attempt to set the value.
- 
         [function]
        &optional conditionTruncate the value and write it to the archive. 
- 
      
         [macro]
        (&optional value) &body bodyExecute BODYin a context whereunsupported-propertyerrors are ignored andVALUEis returned from any attempt to access them.
- 
      
         [macro]
        (&key (properties t)) &body bodyEvaluate BODYin a context where truncatable values are automatically truncated.
Simple Extraction ¶
This section describes the support for simple extraction to the filesystem.
- 
      
         [function]
        archive &key (directory \*default-pathname-defaults\*) 
        (absolute-pathnames :error) (device-pathnames :error) (dot-dot :error) 
        (strip-components 0) (if-exists :error) (if-newer-exists :error) (symbolic-links 
        :dereference) (hard-links :dereference) (character-devices :skip) (block-devices 
        :skip) (fifos :skip) (filter (constantly t))Extract all entries in ARCHIVEtoDIRECTORY.DIRECTORYdefaults to*DEFAULT-PATHNAME-DEFAULTS*and must be a directory pathname.The following options configure how the final pathname of each entry is computed: ABSOLUTE-PATHANMEScontrols what happens when an entry is discovered that has an absolute pathname. It defaults to:ERROR. The possible values are:- :ALLOW: Allow the pathname as is.
- :SKIP: Silently skip the entry.
- :RELATIVIZE: Strip the leading / and treat it as a relative pathname.
- :ERROR: Signal an- entry-name-is-absolute-error, with the restarts- CONTINUE,- skip-entry, and- relativize-entry-nameactive.
 DEVICE-PATHNAMEScontrols what happens when an entry is discovered that has a non-NILdevice. It defaults to:ERROR. The possible values are:- :ALLOW: Allow the pathname as is.
- :SKIP: Silently skip the entry.
- :RELATIVIZE: Strip the device.
- :ERROR: Signal an- entry-name-contains-device-error, with the restarts- CONTINUE,- skip-entry, and- relativize-entry-nameactive.
 DOT-DOTcontrols what happens when an entry is discovered that has a name containing .. in a directory component. It defaults to:ERROR. The possible values are:- :BACK: Allow the pathname as is, treating .. as- :BACK.
- :SKIP: Silently skip the entry.
- :ERROR: Signal an- ENTRY-NAME-CONTAINS-..-- ERROR, with the restarts- TREAT-..-- AS-BACKand- skip-entryactive.
 STRIP-COMPONENTSis an integer specifying how many directory and file components to strip. Defaults to 0.The following options configure what happens to files that already exist on the filesystem. IF-NEWER-EXISTScontrols what happens to files that already exist withinDIRECTORYif extractingARCHIVEwould overwrite them and the existing file has a more recent mtime. It defaults to:ERROR. The possible values are:- NIL,- :KEEP: existing files are skipped
- :SUPERSEDE,- :RENAME,- :RENAME-AND-DELETE,- :NEW-VERSION,- :ERROR: Same behavior as- OPEN.
 IF-EXISTScontrols what happens to files that already exist withinDIRECTORY. It defaults to:ERROR. The possible values are:- NIL,- :KEEP: existing files are skipped
- :SUPERSEDE,- :RENAME,- :RENAME-AND-DELETE,- :NEW-VERSION,- :ERROR: Same behavior as- OPEN.
 The following options configure how certain types of entries are extracted. SYMBOLIC-LINKScontrols how symbolic links are extracted fromARCHIVE. It defaults to:DEREFERENCE. The possible values are:- :DEREFERENCE: any symlink entries are instead written as normal files with the contents of the file they point to.
- :SKIP: Skip the symlink.
- :ERROR: Signal a- extract-symbolic-link-entry-errorwith the restarts- dereference-linkand- skip-entryactive.
 HARD-LINKScontrols how hard links are extracted fromARCHIVE. It defaults to:DEREFERENCE. The possible values are:- :DEREFERENCE: any hard link entries are instead written as normal files with the contents of the file they point to.
- :SKIP: Skip the hard link.
- :ERROR: Signal a- extract-hard-link-entry-errorwith the restarts- dereference-linkand- skip-entryactive.
 CHARACTER-DEVICEScontrols how character devices are extracted fromARCHIVE. It defaults to:SKIP. The possible values are:- :SKIP: Skip the entry.
- :ERROR: Signal a- extract-character-device-entry-errorwith the restart- SKIP-ENTRYactive.
 BLOCK-DEVICEScontrols how block devices are extracted fromARCHIVE. It defaults to:SKIP. The possible values are:- :SKIP: Skip the entry.
- :ERROR: Signal a- extract-block-device-entry-errorwith the restart- SKIP-ENTRYactive.
 FIFOScontrols howFIFOs are extracted fromARCHIVE. It defaults to:SKIP. The possible values are:- :SKIP: Skip the entry.
- :ERROR: Signal a- extract-fifo-entry-errorwith the restart- SKIP-ENTRYactive.
 The following option controls what entries are extracted. FILTERdefaults to (CONSTANTLYT). Must be a function designator that takes two arguments (the entry and the pathname were it will be extracted) and returns non-NILif the entry should be extracted.If symbolic and hard links are dereferenced, there may be broken or circular links. If that is detected, a broken-or-circular-links-erroris signalled with theCONTINUErestart active.
Simple Extraction Conditions ¶
This section describes the conditions that can occur during
simple-extract-archive.
- 
         [condition]
        Base class of all errors signaled during archive extraction. 
- 
      
         [condition]
        An extraction error that is specific to an ENTRY.
- [reader] (:entry = '\*current-entry\*)
- 
      
         [condition]
        An entry contains a device in its pathname. 
- 
      
         [condition]
        An entry contains .. in its pathname. 
- 
      
         [condition]
        An entry pathname is absolute. 
- 
      
         [condition]
        A character device that cannot be extracted. 
- 
      
         [condition]
        A block device that cannot be extracted. 
- 
      
         [condition]
        A FIFOthat cannot be extracted.
- 
      
         [condition]
        A symbolic link that cannot be extracted. 
- 
      
         [condition]
        A hard link that cannot be extracted. 
- 
      
         [condition]
        A series of symbolic or hard links is broken or circular. 
- 
         [function]
        &optional cHandle condition C by dereferencing the link. 
- 
         [function]
        &optional cHandle condition C by skipping the entry. 
- 
      
         [function]
        &optional cHandle condition C by relativizing the pathname. 
- 
      
         [function]
        &optional cHandle condition C by treating .. as :BACK.
Extraction¶
This section describes the support for non-portable extraction to the filesystem.
- 
         [function]
        archive &key (directory \*default-pathname-defaults\*) 
        (absolute-pathnames :error) (device-pathnames :error) (dot-dot :error) 
        (strip-components 0) (if-exists :error) (if-newer-exists :error) 
        (if-symbolic-link-exists :error) (if-directory-symbolic-link-exists :error) 
        keep-directory-metadata touch (no-same-owner (rootp)) numeric-uid mask 
        (symbolic-links t) (hard-links t) (character-devices (if (rootp) t :error)) 
        (block-devices (if (rootp) t :error)) (fifos t) (filter (constantly t))Extract all entries in ARCHIVEtoDIRECTORY.DIRECTORYdefaults to*DEFAULT-PATHNAME-DEFAULTS*and must be a directory pathname.The following options configure how the final pathname of each entry is computed: ABSOLUTE-PATHANMEScontrols what happens when an entry is discovered that has an absolute pathname. It defaults to:ERROR. The possible values are:- :ALLOW: Allow the pathname as is.
- :SKIP: Silently skip the entry.
- :RELATIVIZE: Strip the leading / and treat it as a relative pathname.
- :ERROR: Signal an- entry-name-is-absolute-error, with the restarts- CONTINUE,- skip-entry, and- relativize-entry-nameactive.
 DEVICE-PATHNAMEScontrols what happens when an entry is discovered that has a non-NILdevice. It defaults to:ERROR. The possible values are:- :ALLOW: Allow the pathname as is.
- :SKIP: Silently skip the entry.
- :RELATIVIZE: Strip the device.
- :ERROR: Signal an- entry-name-contains-device-error, with the restarts- CONTINUE,- skip-entry, and- relativize-entry-nameactive.
 DOT-DOTcontrols what happens when an entry is discovered that has a name containing .. in a directory component. It defaults to:ERROR. The possible values are:- :BACK: Allow the pathname as is, treating .. as- :BACK.
- :SKIP: Silently skip the entry.
- :ERROR: Signal an- ENTRY-NAME-CONTAINS-..-- ERROR, with the restarts- TREAT-..-- AS-BACKand- skip-entryactive.
 STRIP-COMPONENTSis an integer specifying how many directory and file components to strip. Defaults to 0.The following options configure what happens to files that already exist on the filesystem. IF-DIRECTORY-SYMBOLIC-LINK-EXISTScontrols what happens to existing directories that are symlinks. This includes any symlink on the destination path of the entry. Defaults to:ERROR. The possible values are:- :ERROR: Signal a- extraction-through-symbolic-link-errorwith the restarts- follow-symbolic-link,- replace-symbolic-link, and- skip-entryactive.
- NIL,- :SKIP: Skip the entry.
- :SUPERSEDE: replace the symlink with a new, empty directory.
- :FOLLOW: keep the existing symlink.
 IF-SYMBOLIC-LINK-EXISTScontrols what happesn to existing files that are symlinks. Defaults to:ERROR. The possible values are:- :ERROR: Signal a- extraction-through-symbolic-link-errorwith the restarts- follow-symbolic-link,- replace-symbolic-link, and- skip-entryactive.
- NIL,- :SKIP: Skip the entry.
- :FOLLOW: Follow the symlink and write the contents of the entry, respecting- IF-NEWER-EXISTSand- IF-EXISTS.
- :SUPERSEDE: Replace the symlink.
 IF-NEWER-EXISTScontrols what happens to files that already exist withinDIRECTORYif extractingARCHIVEwould overwrite them and the existing file has a more recent mtime. It defaults to:ERROR. The possible values are:- :ERROR: A- destination-exists-erroris signaled, with the restarts- supersede-file,- remove-file, and- skip-entryactive
- NIL,- :SKIP,- :KEEP: existing files are skipped
- :SUPERSEDE: Overwrite the file
- :REPLACE: Delete file and replace it, atomically if possible.
 IF-EXISTScontrols what happens to files that already exist withinDIRECTORY. It defaults to:ERROR. The possible values are:- :ERROR: A- destination-exists-erroris signaled, with the restarts- supersede-file,- remove-file, and- skip-entryactive
- NIL,- :SKIP,- :KEEP: existing files are skipped
- :SUPERSEDE: Overwrite the file
- :REPLACE: Delete file and replace it, atomically if possible.
 The following options configure how metadata is extracted. If KEEP-DIRECTORY-METADATAis non-NIL, then metadata for existing directories is kept.If TOUCHis non-NIL, file mtimes will not be set on extraction.If NO-SAME-OWNERis non-NIL, then the owner and group of extracted entries will not be set. Defaults to T for non-root users and Windows. Must be T on Windows.If NUMERIC-UIDis non-NIL,UIDs andGIDs are preferred overUNAMEs andGNAMEs.MASKis a list of permissions to remove from all entries.The following options configure how certain types of entries are extracted. SYMBOLIC-LINKScontrols how symbolic links are extracted fromARCHIVE. It defaults to T on non-Windows platforms and:DEREFERENCEon Windows. The possible values are:- T : Extract the symlink as normal. 
- :DEREFERENCE: any symlink entries are instead written as normal files with the contents of the file they point to.
- :SKIP: Skip the symlink.
- :ERROR: Signal a- extract-symbolic-link-entry-errorwith the restarts- extract-link,- dereference-linkand- skip-entryactive.
 HARD-LINKScontrols how hard links are extracted fromARCHIVE. It defaults to T on non-WINDOWSplatforms and:DEREFERENCEon Windows. The possible values are:- T : Extract the hard link as normal. 
- :DEREFERENCE: any hard link entries are instead written as normal files with the contents of the file they point to.
- :SKIP: Skip the hard link.
- :ERROR: Signal a- extract-hard-link-entry-errorwith the restarts- extract-link,- dereference-linkand- skip-entryactive.
 CHARACTER-DEVICEScontrols how character devices are extracted fromARCHIVE. It defaults to:ERRORon Windows or non-Windows and the current user is not root, T otherwise. The possible values are:- T : Extract the character device. 
- :SKIP: Skip the entry.
- :ERROR: Signal a- extract-character-device-entry-errorwith the restarts- extract-deviceand- skip-entryactive.
 BLOCK-DEVICEScontrols how block devices are extracted fromARCHIVE. It defaults to:ERRORon Windows or non-Windows and the current user is not root, T otherwise. The possible values are:- T : Extract the block device. 
- :SKIP: Skip the entry.
- :ERROR: Signal a- extract-block-device-entry-errorwith the restarts- extract-deviceand- skip-entryactive.
 FIFOScontrols howFIFOs are extracted fromARCHIVE. It defaults to T on non-Windows platforms and:ERRORon Windows. The possible values are:- T : Extract the - FIFO.
- :SKIP: Skip the entry.
- :ERROR: Signal a- extract-fifo-entry-errorwith the restarts- extract-fifoand- skip-entryactive.
 The following option controls what entries are extracted. FILTERdefaults to (CONSTANTLYT). Must be a function designator that takes two arguments (the entry and the pathname were it will be extracted) and returns non-NILif the entry should be extracted.If symbolic and hard links are dereferenced, there may be broken or circular links. If that is detected, a broken-or-circular-links-erroris signalled with theCONTINUErestart active.
Extraction Conditions ¶
This section describes the conditions that can occur during
extract-archive.
- 
         [condition]
        Base class of all errors signaled during archive extraction. 
- 
      
         [condition]
        An extraction error that is specific to an ENTRY.
- [reader] (:entry = '\*current-entry\*)
- 
      
         [condition]
        An entry contains a device in its pathname. 
- 
      
         [condition]
        An entry contains .. in its pathname. 
- 
      
         [condition]
        An entry pathname is absolute. 
- 
      
         [condition]
        A character device that cannot be extracted. 
- 
      
         [condition]
        A block device that cannot be extracted. 
- 
      
         [condition]
        A FIFOthat cannot be extracted.
- 
      
         [condition]
        A symbolic link that cannot be extracted. 
- 
      
         [condition]
        A hard link that cannot be extracted. 
- 
      
         [condition]
        A series of symbolic or hard links is broken or circular. 
- 
         [condition]
        Signaled when the destination of an entry exists. 
- 
      
         [condition]
        Signaled when attempting to extract through a symbolic link. 
- 
      
         [condition]
        Signaled when attempting to create a directory when a file already exists. 
- 
         [function]
        &optional cHandle condition C by dereferencing the link. 
- 
         [function]
        &optional cHandle condition C by skipping the entry. 
- 
      
         [function]
        &optional cHandle condition C by relativizing the pathname. 
- 
      
         [function]
        &optional cHandle condition C by treating .. as :BACK.
- 
         [function]
        &optional cHandle C by deleting the file. 
- 
         [function]
        &optional cHandle C by following the symbolic link. 
- 
         [function]
        &optional cHandle C by replacing the symbolic link 
- 
         [function]
        &optional cHandle C by truncating the file and overwriting it. 
- 
         [function]
        &optional cHandle C by extracting the link. 
- 
         [function]
        &optional cHandle C by extracting the device. 
- 
         [function]
        &optional cHandle C by extracting the fifo. 
Create¶
This section describes the support for non-portable creation of archives from the filesystem.
- 
         [function]
        archive file-list &key prefix recursep 
        dereference-hardlinks-p (filter (constantly t))Add all files in FILE-LISTtoARCHIVE.FILE-LISTmay be a string, pathname, or a list of strings or pathnames. All relative pathname designators are relative to*DEFAULT-PATHNAME-DEFAULTS*. If an item inFILE-LISTdesignates an absolute pathname, the corresponding entry in the tar file will be absolute as well.PREFIXmust be a string which is prepended to every entry name in the archive.If RECURSEPis true, then any entries inFILE-LISTnaming directories (and not symlinks to directories) will be recursed into.If DEREFERENCE-HARDLINKS-Pis true, then hardlinks will be followed and saved as regular file entries instead of hardlink entries.The following option controls what entries are created. FILTERdefaults to (CONSTANTLYT). Must be a function designator that takes two arguments (the entry and the pathname were it will be extracted) and returns non-NILif the entry should be extracted.