diff options
Diffstat (limited to 'archivers/libarchive/files/doc/text/archive_write.3.txt')
-rw-r--r-- | archivers/libarchive/files/doc/text/archive_write.3.txt | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/archivers/libarchive/files/doc/text/archive_write.3.txt b/archivers/libarchive/files/doc/text/archive_write.3.txt index 7f779c81d11..ee525efe858 100644 --- a/archivers/libarchive/files/doc/text/archive_write.3.txt +++ b/archivers/libarchive/files/doc/text/archive_write.3.txt @@ -1,66 +1,66 @@ ARCHIVE_WRITE(3) BSD Library Functions Manual ARCHIVE_WRITE(3) -NAME - archive_write — functions for creating archives +1mNAME0m + 1marchive_write 22m— functions for creating archives -LIBRARY +1mLIBRARY0m Streaming Archive Library (libarchive, -larchive) -SYNOPSIS - #include <archive.h> +1mSYNOPSIS0m + 1m#include <archive.h>0m -DESCRIPTION +1mDESCRIPTION0m These functions provide a complete API for creating streaming archive files. The general process is to first create the struct archive object, set any desired options, initialize the archive, append entries, then close the archive and release all resources. - Create archive object + 1mCreate archive object0m See archive_write_new(3). To write an archive, you must first obtain an initialized struct archive - object from archive_write_new(). + object from 1marchive_write_new22m(). - Enable filters and formats, configure block size and padding + 1mEnable filters and formats, configure block size and padding0m See archive_write_filter(3), archive_write_format(3) and archive_write_blocksize(3). You can then modify this object for the desired operations with the vari‐ - ous archive_write_set_XXX() functions. In particular, you will need to - invoke appropriate archive_write_add_XXX() and archive_write_set_XXX() + ous 1marchive_write_set_XXX22m() functions. In particular, you will need to + invoke appropriate 1marchive_write_add_XXX22m() and 1marchive_write_set_XXX22m() functions to enable the corresponding compression and format support. - Set options + 1mSet options0m See archive_read_set_options(3). - Open archive + 1mOpen archive0m See archive_write_open(3). Once you have prepared the struct archive object, you call - archive_write_open() to actually open the archive and prepare it for + 1marchive_write_open22m() to actually open the archive and prepare it for writing. There are several variants of this function; the most basic expects you to provide pointers to several functions that can provide blocks of bytes from the archive. There are convenience forms that allow - you to specify a filename, file descriptor, FILE * object, or a block of + you to specify a filename, file descriptor, 4mFILE24m 4m*24m object, or a block of memory from which to write the archive data. - Produce archive + 1mProduce archive0m See archive_write_header(3) and archive_write_data(3). Individual archive entries are written in a three-step process: You first initialize a struct archive_entry structure with information about the new entry. At a minimum, you should set the pathname of the entry and - provide a struct stat with a valid st_mode field, which specifies the - type of object and st_size field, which specifies the size of the data + provide a 4mstruct24m 4mstat24m with a valid 4mst_mode24m field, which specifies the + type of object and 4mst_size24m field, which specifies the size of the data portion of the object. - Release resources + 1mRelease resources0m See archive_write_free(3). - After all entries have been written, use the archive_write_free() func‐ + After all entries have been written, use the 1marchive_write_free22m() func‐ tion to release all resources. -EXAMPLE +1mEXAMPLE0m The following sketch illustrates basic usage of the library. In this example, the callback functions are simply wrappers around the standard open(2), write(2), and close(2) system calls. @@ -160,17 +160,17 @@ EXAMPLE return 0; } -SEE ALSO +1mSEE ALSO0m tar(1), libarchive(3), archive_write_set_options(3), cpio(5), mtree(5), tar(5) -HISTORY - The libarchive library first appeared in FreeBSD 5.3. +1mHISTORY0m + The 1mlibarchive 22mlibrary first appeared in FreeBSD 5.3. -AUTHORS - The libarchive library was written by Tim Kientzle <kientzle@acm.org>. +1mAUTHORS0m + The 1mlibarchive 22mlibrary was written by Tim Kientzle <kientzle@acm.org>. -BUGS +1mBUGS0m There are many peculiar bugs in historic tar implementations that may cause certain programs to reject archives written by this library. For example, several historic implementations calculated header checksums @@ -184,7 +184,7 @@ BUGS a standard attribute for large device numbers. This library uses “SCHILY.devminor” and “SCHILY.devmajor” for device numbers that exceed the range supported by the backwards-compatible ustar header. These keys - are compatible with Joerg Schilling's star archiver. Other implementa‐ + are compatible with Joerg Schilling's 1mstar 22marchiver. Other implementa‐ tions may not recognize these keys and will thus be unable to correctly restore device nodes with large device numbers from archives created by this library. |