archive_write_set_format(3) archive_write_set_format_7zip

LIBRARY

Streaming Archive Library (libarchive, -larchive)

SYNOPSIS

In archive.h Ft int Fn archive_write_set_format struct archive * int code Ft int Fn archive_write_set_format_7zip struct archive * Ft int Fn archive_write_set_format_ar struct archive * Ft int Fn archive_write_set_format_ar_bsd struct archive * Ft int Fn archive_write_set_format_ar_svr4 struct archive * Ft int Fn archive_write_set_format_by_name struct archive * const char *name Ft int Fn archive_write_set_format_cpio struct archive * Ft int Fn archive_write_set_format_cpio_newc struct archive * Ft int Fn archive_write_set_format_filter_by_ext struct archive * const char *filename Ft int Fn archive_write_set_format_filter_by_ext_def struct archive * const char *filename const char *def_ext Ft int Fn archive_write_set_format_gnutar struct archive * Ft int Fn archive_write_set_format_iso9660 struct archive * Ft int Fn archive_write_set_format_mtree struct archive * Ft int Fn archive_write_set_format_pax struct archive * Ft int Fn archive_write_set_format_pax_restricted struct archive * Ft int Fn archive_write_set_format_raw struct archive * Ft int Fn archive_write_set_format_shar struct archive * Ft int Fn archive_write_set_format_shar_dump struct archive * Ft int Fn archive_write_set_format_ustar struct archive * Ft int Fn archive_write_set_format_v7tar struct archive * Ft int Fn archive_write_set_format_warc struct archive * Ft int Fn archive_write_set_format_xar struct archive * Ft int Fn archive_write_set_format_zip struct archive *

DESCRIPTION

These functions set the format that will be used for the archive.

The library can write a variety of common archive formats.

Fn archive_write_set_format
Sets the format based on the format code (see archive.h for the full list of format codes). In particular, this can be used in conjunction with Fn archive_format to create a new archive with the same format as an existing archive.
Fn archive_write_set_format_by_name
Sets the corresponding format based on the common name.
Fn archive_write_set_format_filter_by_ext , Fn archive_write_set_format_filter_by_ext_def
Sets both filters and format based on the output filename. Supported extensions: .7z, .zip, .jar, .cpio, .iso, .a, .ar, .tar, .tgz, .tar.gz, .tar.bz2, .tar.xz
Fn archive_write_set_format_7zip Fn archive_write_set_format_ar_bsd , Fn archive_write_set_format_ar_svr4 , Fn archive_write_set_format_cpio Fn archive_write_set_format_cpio_newc Fn archive_write_set_format_gnutar Fn archive_write_set_format_iso9660 Fn archive_write_set_format_mtree Fn archive_write_set_format_mtree_classic Fn archive_write_set_format_pax Fn archive_write_set_format_pax_restricted Fn archive_write_set_format_raw Fn archive_write_set_format_shar Fn archive_write_set_format_shar_dump Fn archive_write_set_format_ustar Fn archive_write_set_format_v7tar Fn archive_write_set_format_warc Fn archive_write_set_format_xar Fn archive_write_set_format_zip
Set the format as specified. More details on the formats supported by libarchive can be found in the libarchive-formats5 manual page.

RETURN VALUES

These functions return ARCHIVE_OK on success, or ARCHIVE_FATAL

ERRORS

Detailed error codes and textual descriptions are available from the Fn archive_errno and Fn archive_error_string functions.