28 #ifndef ARCHIVE_H_INCLUDED 29 #define ARCHIVE_H_INCLUDED 39 #define ARCHIVE_VERSION_NUMBER 3005002 53 #if defined(__BORLANDC__) && __BORLANDC__ >= 0x560 55 #elif !defined(__WATCOMC__) && !defined(_MSC_VER) && !defined(__INTERIX) && !defined(__BORLANDC__) && !defined(_SCO_DS) && !defined(__osf__) && !defined(__CLANG_INTTYPES_H) 56 # include <inttypes.h> 60 #if !defined(__LA_INT64_T_DEFINED) 62 # if ARCHIVE_VERSION_NUMBER < 4000000 63 #define __LA_INT64_T la_int64_t 65 #define __LA_INT64_T_DEFINED 66 # if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__WATCOMC__) 67 typedef __int64 la_int64_t;
70 # if defined(_SCO_DS) || defined(__osf__) 71 typedef long long la_int64_t;
73 typedef int64_t la_int64_t;
79 #if !defined(__LA_SSIZE_T_DEFINED) 81 # if ARCHIVE_VERSION_NUMBER < 4000000 82 #define __LA_SSIZE_T la_ssize_t 84 #define __LA_SSIZE_T_DEFINED 85 # if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__WATCOMC__) 86 # if defined(_SSIZE_T_DEFINED) || defined(_SSIZE_T_) 87 typedef ssize_t la_ssize_t;
88 # elif defined(_WIN64) 89 typedef __int64 la_ssize_t;
91 typedef long la_ssize_t;
95 typedef ssize_t la_ssize_t;
101 #include "android_lf.h" 109 #if ((defined __WIN32__) || (defined _WIN32) || defined(__CYGWIN__)) && (!defined LIBARCHIVE_STATIC) 110 # ifdef __LIBARCHIVE_BUILD 112 # define __LA_DECL __attribute__((dllexport)) extern 114 # define __LA_DECL __declspec(dllexport) 120 # define __LA_DECL __declspec(dllimport) 128 #if defined(__GNUC__) && __GNUC__ >= 3 && !defined(__MINGW32__) 129 #define __LA_PRINTF(fmtarg, firstvararg) \ 130 __attribute__((__format__ (__printf__, fmtarg, firstvararg))) 132 #define __LA_PRINTF(fmtarg, firstvararg) 135 #if defined(__GNUC__) && __GNUC__ >= 3 && __GNUC_MINOR__ >= 1 136 # define __LA_DEPRECATED __attribute__((deprecated)) 138 # define __LA_DEPRECATED 153 __LA_DECL
int archive_version_number(
void);
158 #define ARCHIVE_VERSION_ONLY_STRING "3.5.2dev" 159 #define ARCHIVE_VERSION_STRING "libarchive " ARCHIVE_VERSION_ONLY_STRING 160 __LA_DECL
const char * archive_version_string(
void);
169 __LA_DECL
const char * archive_version_details(
void);
176 __LA_DECL
const char * archive_zlib_version(
void);
177 __LA_DECL
const char * archive_liblzma_version(
void);
178 __LA_DECL
const char * archive_bzlib_version(
void);
179 __LA_DECL
const char * archive_liblz4_version(
void);
180 __LA_DECL
const char * archive_libzstd_version(
void);
184 struct archive_entry;
191 #define ARCHIVE_EOF 1 193 #define ARCHIVE_RETRY (-10) 194 #define ARCHIVE_WARN (-20) 196 #define ARCHIVE_FAILED (-25) 198 #define ARCHIVE_FATAL (-30) 222 typedef la_ssize_t archive_read_callback(
struct archive *,
223 void *_client_data,
const void **_buffer);
230 typedef la_int64_t archive_skip_callback(
struct archive *,
231 void *_client_data, la_int64_t request);
237 typedef la_int64_t archive_seek_callback(
struct archive *,
238 void *_client_data, la_int64_t offset,
int whence);
241 typedef la_ssize_t archive_write_callback(
struct archive *,
243 const void *_buffer,
size_t _length);
245 typedef int archive_open_callback(
struct archive *,
void *_client_data);
247 typedef int archive_close_callback(
struct archive *,
void *_client_data);
249 typedef int archive_free_callback(
struct archive *,
void *_client_data);
255 typedef int archive_switch_callback(
struct archive *,
void *_client_data1,
256 void *_client_data2);
262 typedef const char *archive_passphrase_callback(
struct archive *,
268 #define ARCHIVE_FILTER_NONE 0 269 #define ARCHIVE_FILTER_GZIP 1 270 #define ARCHIVE_FILTER_BZIP2 2 271 #define ARCHIVE_FILTER_COMPRESS 3 272 #define ARCHIVE_FILTER_PROGRAM 4 273 #define ARCHIVE_FILTER_LZMA 5 274 #define ARCHIVE_FILTER_XZ 6 275 #define ARCHIVE_FILTER_UU 7 276 #define ARCHIVE_FILTER_RPM 8 277 #define ARCHIVE_FILTER_LZIP 9 278 #define ARCHIVE_FILTER_LRZIP 10 279 #define ARCHIVE_FILTER_LZOP 11 280 #define ARCHIVE_FILTER_GRZIP 12 281 #define ARCHIVE_FILTER_LZ4 13 282 #define ARCHIVE_FILTER_ZSTD 14 284 #if ARCHIVE_VERSION_NUMBER < 4000000 285 #define ARCHIVE_COMPRESSION_NONE ARCHIVE_FILTER_NONE 286 #define ARCHIVE_COMPRESSION_GZIP ARCHIVE_FILTER_GZIP 287 #define ARCHIVE_COMPRESSION_BZIP2 ARCHIVE_FILTER_BZIP2 288 #define ARCHIVE_COMPRESSION_COMPRESS ARCHIVE_FILTER_COMPRESS 289 #define ARCHIVE_COMPRESSION_PROGRAM ARCHIVE_FILTER_PROGRAM 290 #define ARCHIVE_COMPRESSION_LZMA ARCHIVE_FILTER_LZMA 291 #define ARCHIVE_COMPRESSION_XZ ARCHIVE_FILTER_XZ 292 #define ARCHIVE_COMPRESSION_UU ARCHIVE_FILTER_UU 293 #define ARCHIVE_COMPRESSION_RPM ARCHIVE_FILTER_RPM 294 #define ARCHIVE_COMPRESSION_LZIP ARCHIVE_FILTER_LZIP 295 #define ARCHIVE_COMPRESSION_LRZIP ARCHIVE_FILTER_LRZIP 314 #define ARCHIVE_FORMAT_BASE_MASK 0xff0000 315 #define ARCHIVE_FORMAT_CPIO 0x10000 316 #define ARCHIVE_FORMAT_CPIO_POSIX (ARCHIVE_FORMAT_CPIO | 1) 317 #define ARCHIVE_FORMAT_CPIO_BIN_LE (ARCHIVE_FORMAT_CPIO | 2) 318 #define ARCHIVE_FORMAT_CPIO_BIN_BE (ARCHIVE_FORMAT_CPIO | 3) 319 #define ARCHIVE_FORMAT_CPIO_SVR4_NOCRC (ARCHIVE_FORMAT_CPIO | 4) 320 #define ARCHIVE_FORMAT_CPIO_SVR4_CRC (ARCHIVE_FORMAT_CPIO | 5) 321 #define ARCHIVE_FORMAT_CPIO_AFIO_LARGE (ARCHIVE_FORMAT_CPIO | 6) 322 #define ARCHIVE_FORMAT_SHAR 0x20000 323 #define ARCHIVE_FORMAT_SHAR_BASE (ARCHIVE_FORMAT_SHAR | 1) 324 #define ARCHIVE_FORMAT_SHAR_DUMP (ARCHIVE_FORMAT_SHAR | 2) 325 #define ARCHIVE_FORMAT_TAR 0x30000 326 #define ARCHIVE_FORMAT_TAR_USTAR (ARCHIVE_FORMAT_TAR | 1) 327 #define ARCHIVE_FORMAT_TAR_PAX_INTERCHANGE (ARCHIVE_FORMAT_TAR | 2) 328 #define ARCHIVE_FORMAT_TAR_PAX_RESTRICTED (ARCHIVE_FORMAT_TAR | 3) 329 #define ARCHIVE_FORMAT_TAR_GNUTAR (ARCHIVE_FORMAT_TAR | 4) 330 #define ARCHIVE_FORMAT_ISO9660 0x40000 331 #define ARCHIVE_FORMAT_ISO9660_ROCKRIDGE (ARCHIVE_FORMAT_ISO9660 | 1) 332 #define ARCHIVE_FORMAT_ZIP 0x50000 333 #define ARCHIVE_FORMAT_EMPTY 0x60000 334 #define ARCHIVE_FORMAT_AR 0x70000 335 #define ARCHIVE_FORMAT_AR_GNU (ARCHIVE_FORMAT_AR | 1) 336 #define ARCHIVE_FORMAT_AR_BSD (ARCHIVE_FORMAT_AR | 2) 337 #define ARCHIVE_FORMAT_MTREE 0x80000 338 #define ARCHIVE_FORMAT_RAW 0x90000 339 #define ARCHIVE_FORMAT_XAR 0xA0000 340 #define ARCHIVE_FORMAT_LHA 0xB0000 341 #define ARCHIVE_FORMAT_CAB 0xC0000 342 #define ARCHIVE_FORMAT_RAR 0xD0000 343 #define ARCHIVE_FORMAT_7ZIP 0xE0000 344 #define ARCHIVE_FORMAT_WARC 0xF0000 345 #define ARCHIVE_FORMAT_RAR_V5 0x100000 355 #define ARCHIVE_READ_FORMAT_CAPS_NONE (0) 356 #define ARCHIVE_READ_FORMAT_CAPS_ENCRYPT_DATA (1<<0) 357 #define ARCHIVE_READ_FORMAT_CAPS_ENCRYPT_METADATA (1<<1) 368 #define ARCHIVE_READ_FORMAT_ENCRYPTION_UNSUPPORTED -2 369 #define ARCHIVE_READ_FORMAT_ENCRYPTION_DONT_KNOW -1 383 __LA_DECL
struct archive *archive_read_new(
void);
393 #if ARCHIVE_VERSION_NUMBER < 4000000 394 __LA_DECL
int archive_read_support_compression_all(
struct archive *)
396 __LA_DECL
int archive_read_support_compression_bzip2(
struct archive *)
398 __LA_DECL
int archive_read_support_compression_compress(
struct archive *)
400 __LA_DECL
int archive_read_support_compression_gzip(
struct archive *)
402 __LA_DECL
int archive_read_support_compression_lzip(
struct archive *)
404 __LA_DECL
int archive_read_support_compression_lzma(
struct archive *)
406 __LA_DECL
int archive_read_support_compression_none(
struct archive *)
408 __LA_DECL
int archive_read_support_compression_program(
struct archive *,
409 const char *command) __LA_DEPRECATED;
410 __LA_DECL
int archive_read_support_compression_program_signature
411 (
struct archive *,
const char *,
412 const void * ,
size_t) __LA_DEPRECATED;
414 __LA_DECL
int archive_read_support_compression_rpm(
struct archive *)
416 __LA_DECL
int archive_read_support_compression_uu(
struct archive *)
418 __LA_DECL
int archive_read_support_compression_xz(
struct archive *)
422 __LA_DECL
int archive_read_support_filter_all(
struct archive *);
423 __LA_DECL
int archive_read_support_filter_by_code(
struct archive *,
int);
424 __LA_DECL
int archive_read_support_filter_bzip2(
struct archive *);
425 __LA_DECL
int archive_read_support_filter_compress(
struct archive *);
426 __LA_DECL
int archive_read_support_filter_gzip(
struct archive *);
427 __LA_DECL
int archive_read_support_filter_grzip(
struct archive *);
428 __LA_DECL
int archive_read_support_filter_lrzip(
struct archive *);
429 __LA_DECL
int archive_read_support_filter_lz4(
struct archive *);
430 __LA_DECL
int archive_read_support_filter_lzip(
struct archive *);
431 __LA_DECL
int archive_read_support_filter_lzma(
struct archive *);
432 __LA_DECL
int archive_read_support_filter_lzop(
struct archive *);
433 __LA_DECL
int archive_read_support_filter_none(
struct archive *);
434 __LA_DECL
int archive_read_support_filter_program(
struct archive *,
435 const char *command);
436 __LA_DECL
int archive_read_support_filter_program_signature
437 (
struct archive *,
const char * ,
438 const void * ,
size_t);
439 __LA_DECL
int archive_read_support_filter_rpm(
struct archive *);
440 __LA_DECL
int archive_read_support_filter_uu(
struct archive *);
441 __LA_DECL
int archive_read_support_filter_xz(
struct archive *);
442 __LA_DECL
int archive_read_support_filter_zstd(
struct archive *);
444 __LA_DECL
int archive_read_support_format_7zip(
struct archive *);
445 __LA_DECL
int archive_read_support_format_all(
struct archive *);
446 __LA_DECL
int archive_read_support_format_ar(
struct archive *);
447 __LA_DECL
int archive_read_support_format_by_code(
struct archive *,
int);
448 __LA_DECL
int archive_read_support_format_cab(
struct archive *);
449 __LA_DECL
int archive_read_support_format_cpio(
struct archive *);
450 __LA_DECL
int archive_read_support_format_empty(
struct archive *);
451 __LA_DECL
int archive_read_support_format_gnutar(
struct archive *);
452 __LA_DECL
int archive_read_support_format_iso9660(
struct archive *);
453 __LA_DECL
int archive_read_support_format_lha(
struct archive *);
454 __LA_DECL
int archive_read_support_format_mtree(
struct archive *);
455 __LA_DECL
int archive_read_support_format_rar(
struct archive *);
456 __LA_DECL
int archive_read_support_format_rar5(
struct archive *);
457 __LA_DECL
int archive_read_support_format_raw(
struct archive *);
458 __LA_DECL
int archive_read_support_format_tar(
struct archive *);
459 __LA_DECL
int archive_read_support_format_warc(
struct archive *);
460 __LA_DECL
int archive_read_support_format_xar(
struct archive *);
463 __LA_DECL
int archive_read_support_format_zip(
struct archive *);
467 __LA_DECL
int archive_read_support_format_zip_streamable(
struct archive *);
469 __LA_DECL
int archive_read_support_format_zip_seekable(
struct archive *);
475 __LA_DECL
int archive_read_set_format(
struct archive *,
int);
476 __LA_DECL
int archive_read_append_filter(
struct archive *,
int);
477 __LA_DECL
int archive_read_append_filter_program(
struct archive *,
479 __LA_DECL
int archive_read_append_filter_program_signature
480 (
struct archive *,
const char *,
const void * ,
size_t);
483 __LA_DECL
int archive_read_set_open_callback(
struct archive *,
484 archive_open_callback *);
485 __LA_DECL
int archive_read_set_read_callback(
struct archive *,
486 archive_read_callback *);
487 __LA_DECL
int archive_read_set_seek_callback(
struct archive *,
488 archive_seek_callback *);
489 __LA_DECL
int archive_read_set_skip_callback(
struct archive *,
490 archive_skip_callback *);
491 __LA_DECL
int archive_read_set_close_callback(
struct archive *,
492 archive_close_callback *);
494 __LA_DECL
int archive_read_set_switch_callback(
struct archive *,
495 archive_switch_callback *);
498 __LA_DECL
int archive_read_set_callback_data(
struct archive *,
void *);
500 __LA_DECL
int archive_read_set_callback_data2(
struct archive *,
void *,
503 __LA_DECL
int archive_read_add_callback_data(
struct archive *,
void *,
506 __LA_DECL
int archive_read_append_callback_data(
struct archive *,
void *);
508 __LA_DECL
int archive_read_prepend_callback_data(
struct archive *,
void *);
511 __LA_DECL
int archive_read_open1(
struct archive *);
514 __LA_DECL
int archive_read_open(
struct archive *,
void *_client_data,
515 archive_open_callback *, archive_read_callback *,
516 archive_close_callback *);
517 __LA_DECL
int archive_read_open2(
struct archive *,
void *_client_data,
518 archive_open_callback *, archive_read_callback *,
519 archive_skip_callback *, archive_close_callback *);
527 __LA_DECL
int archive_read_open_filename(
struct archive *,
528 const char *_filename,
size_t _block_size);
531 __LA_DECL
int archive_read_open_filenames(
struct archive *,
532 const char **_filenames,
size_t _block_size);
533 __LA_DECL
int archive_read_open_filename_w(
struct archive *,
534 const wchar_t *_filename,
size_t _block_size);
536 __LA_DECL
int archive_read_open_file(
struct archive *,
537 const char *_filename,
size_t _block_size) __LA_DEPRECATED;
539 __LA_DECL
int archive_read_open_memory(
struct archive *,
540 const void * buff,
size_t size);
542 __LA_DECL
int archive_read_open_memory2(
struct archive *a,
const void *buff,
543 size_t size,
size_t read_size);
545 __LA_DECL
int archive_read_open_fd(
struct archive *,
int _fd,
549 __LA_DECL
int archive_read_open_FILE(
struct archive *, FILE *_file);
552 __LA_DECL
int archive_read_next_header(
struct archive *,
553 struct archive_entry **);
556 __LA_DECL
int archive_read_next_header2(
struct archive *,
557 struct archive_entry *);
563 __LA_DECL la_int64_t archive_read_header_position(
struct archive *);
583 __LA_DECL
int archive_read_has_encrypted_entries(
struct archive *);
589 __LA_DECL
int archive_read_format_capabilities(
struct archive *);
592 __LA_DECL la_ssize_t archive_read_data(
struct archive *,
596 __LA_DECL la_int64_t archive_seek_data(
struct archive *, la_int64_t,
int);
604 __LA_DECL
int archive_read_data_block(
struct archive *a,
605 const void **buff,
size_t *size, la_int64_t *offset);
613 __LA_DECL
int archive_read_data_skip(
struct archive *);
614 __LA_DECL
int archive_read_data_into_fd(
struct archive *,
int fd);
620 __LA_DECL
int archive_read_set_format_option(
struct archive *_a,
621 const char *m,
const char *o,
624 __LA_DECL
int archive_read_set_filter_option(
struct archive *_a,
625 const char *m,
const char *o,
628 __LA_DECL
int archive_read_set_option(
struct archive *_a,
629 const char *m,
const char *o,
632 __LA_DECL
int archive_read_set_options(
struct archive *_a,
638 __LA_DECL
int archive_read_add_passphrase(
struct archive *,
const char *);
639 __LA_DECL
int archive_read_set_passphrase_callback(
struct archive *,
640 void *client_data, archive_passphrase_callback *);
660 #define ARCHIVE_EXTRACT_OWNER (0x0001) 662 #define ARCHIVE_EXTRACT_PERM (0x0002) 664 #define ARCHIVE_EXTRACT_TIME (0x0004) 666 #define ARCHIVE_EXTRACT_NO_OVERWRITE (0x0008) 668 #define ARCHIVE_EXTRACT_UNLINK (0x0010) 670 #define ARCHIVE_EXTRACT_ACL (0x0020) 672 #define ARCHIVE_EXTRACT_FFLAGS (0x0040) 674 #define ARCHIVE_EXTRACT_XATTR (0x0080) 677 #define ARCHIVE_EXTRACT_SECURE_SYMLINKS (0x0100) 679 #define ARCHIVE_EXTRACT_SECURE_NODOTDOT (0x0200) 681 #define ARCHIVE_EXTRACT_NO_AUTODIR (0x0400) 683 #define ARCHIVE_EXTRACT_NO_OVERWRITE_NEWER (0x0800) 685 #define ARCHIVE_EXTRACT_SPARSE (0x1000) 688 #define ARCHIVE_EXTRACT_MAC_METADATA (0x2000) 691 #define ARCHIVE_EXTRACT_NO_HFS_COMPRESSION (0x4000) 694 #define ARCHIVE_EXTRACT_HFS_COMPRESSION_FORCED (0x8000) 696 #define ARCHIVE_EXTRACT_SECURE_NOABSOLUTEPATHS (0x10000) 698 #define ARCHIVE_EXTRACT_CLEAR_NOCHANGE_FFLAGS (0x20000) 700 #define ARCHIVE_EXTRACT_SAFE_WRITES (0x40000) 702 __LA_DECL
int archive_read_extract(
struct archive *,
struct archive_entry *,
704 __LA_DECL
int archive_read_extract2(
struct archive *,
struct archive_entry *,
706 __LA_DECL
void archive_read_extract_set_progress_callback(
struct archive *,
707 void (*_progress_func)(
void *),
void *_user_data);
711 __LA_DECL
void archive_read_extract_set_skip_file(
struct archive *,
712 la_int64_t, la_int64_t);
715 __LA_DECL
int archive_read_close(
struct archive *);
718 __LA_DECL
int archive_read_free(
struct archive *);
719 #if ARCHIVE_VERSION_NUMBER < 4000000 721 __LA_DECL
int archive_read_finish(
struct archive *) __LA_DEPRECATED;
739 __LA_DECL
struct archive *archive_write_new(
void);
740 __LA_DECL
int archive_write_set_bytes_per_block(
struct archive *,
741 int bytes_per_block);
742 __LA_DECL
int archive_write_get_bytes_per_block(
struct archive *);
744 __LA_DECL
int archive_write_set_bytes_in_last_block(
struct archive *,
745 int bytes_in_last_block);
746 __LA_DECL
int archive_write_get_bytes_in_last_block(
struct archive *);
750 __LA_DECL
int archive_write_set_skip_file(
struct archive *,
751 la_int64_t, la_int64_t);
753 #if ARCHIVE_VERSION_NUMBER < 4000000 754 __LA_DECL
int archive_write_set_compression_bzip2(
struct archive *)
756 __LA_DECL
int archive_write_set_compression_compress(
struct archive *)
758 __LA_DECL
int archive_write_set_compression_gzip(
struct archive *)
760 __LA_DECL
int archive_write_set_compression_lzip(
struct archive *)
762 __LA_DECL
int archive_write_set_compression_lzma(
struct archive *)
764 __LA_DECL
int archive_write_set_compression_none(
struct archive *)
766 __LA_DECL
int archive_write_set_compression_program(
struct archive *,
767 const char *cmd) __LA_DEPRECATED;
768 __LA_DECL
int archive_write_set_compression_xz(
struct archive *)
773 __LA_DECL
int archive_write_add_filter(
struct archive *,
int filter_code);
774 __LA_DECL
int archive_write_add_filter_by_name(
struct archive *,
776 __LA_DECL
int archive_write_add_filter_b64encode(
struct archive *);
777 __LA_DECL
int archive_write_add_filter_bzip2(
struct archive *);
778 __LA_DECL
int archive_write_add_filter_compress(
struct archive *);
779 __LA_DECL
int archive_write_add_filter_grzip(
struct archive *);
780 __LA_DECL
int archive_write_add_filter_gzip(
struct archive *);
781 __LA_DECL
int archive_write_add_filter_lrzip(
struct archive *);
782 __LA_DECL
int archive_write_add_filter_lz4(
struct archive *);
783 __LA_DECL
int archive_write_add_filter_lzip(
struct archive *);
784 __LA_DECL
int archive_write_add_filter_lzma(
struct archive *);
785 __LA_DECL
int archive_write_add_filter_lzop(
struct archive *);
786 __LA_DECL
int archive_write_add_filter_none(
struct archive *);
787 __LA_DECL
int archive_write_add_filter_program(
struct archive *,
789 __LA_DECL
int archive_write_add_filter_uuencode(
struct archive *);
790 __LA_DECL
int archive_write_add_filter_xz(
struct archive *);
791 __LA_DECL
int archive_write_add_filter_zstd(
struct archive *);
795 __LA_DECL
int archive_write_set_format(
struct archive *,
int format_code);
796 __LA_DECL
int archive_write_set_format_by_name(
struct archive *,
799 __LA_DECL
int archive_write_set_format_7zip(
struct archive *);
800 __LA_DECL
int archive_write_set_format_ar_bsd(
struct archive *);
801 __LA_DECL
int archive_write_set_format_ar_svr4(
struct archive *);
802 __LA_DECL
int archive_write_set_format_cpio(
struct archive *);
803 __LA_DECL
int archive_write_set_format_cpio_newc(
struct archive *);
804 __LA_DECL
int archive_write_set_format_gnutar(
struct archive *);
805 __LA_DECL
int archive_write_set_format_iso9660(
struct archive *);
806 __LA_DECL
int archive_write_set_format_mtree(
struct archive *);
807 __LA_DECL
int archive_write_set_format_mtree_classic(
struct archive *);
809 __LA_DECL
int archive_write_set_format_pax(
struct archive *);
810 __LA_DECL
int archive_write_set_format_pax_restricted(
struct archive *);
811 __LA_DECL
int archive_write_set_format_raw(
struct archive *);
812 __LA_DECL
int archive_write_set_format_shar(
struct archive *);
813 __LA_DECL
int archive_write_set_format_shar_dump(
struct archive *);
814 __LA_DECL
int archive_write_set_format_ustar(
struct archive *);
815 __LA_DECL
int archive_write_set_format_v7tar(
struct archive *);
816 __LA_DECL
int archive_write_set_format_warc(
struct archive *);
817 __LA_DECL
int archive_write_set_format_xar(
struct archive *);
818 __LA_DECL
int archive_write_set_format_zip(
struct archive *);
819 __LA_DECL
int archive_write_set_format_filter_by_ext(
struct archive *a,
const char *filename);
820 __LA_DECL
int archive_write_set_format_filter_by_ext_def(
struct archive *a,
const char *filename,
const char * def_ext);
821 __LA_DECL
int archive_write_zip_set_compression_deflate(
struct archive *);
822 __LA_DECL
int archive_write_zip_set_compression_store(
struct archive *);
824 __LA_DECL
int archive_write_open(
struct archive *,
void *,
825 archive_open_callback *, archive_write_callback *,
826 archive_close_callback *);
827 __LA_DECL
int archive_write_open2(
struct archive *,
void *,
828 archive_open_callback *, archive_write_callback *,
829 archive_close_callback *, archive_free_callback *);
830 __LA_DECL
int archive_write_open_fd(
struct archive *,
int _fd);
831 __LA_DECL
int archive_write_open_filename(
struct archive *,
const char *_file);
832 __LA_DECL
int archive_write_open_filename_w(
struct archive *,
833 const wchar_t *_file);
835 __LA_DECL
int archive_write_open_file(
struct archive *,
const char *_file)
837 __LA_DECL
int archive_write_open_FILE(
struct archive *, FILE *);
840 __LA_DECL
int archive_write_open_memory(
struct archive *,
841 void *_buffer,
size_t _buffSize,
size_t *_used);
847 __LA_DECL
int archive_write_header(
struct archive *,
848 struct archive_entry *);
849 __LA_DECL la_ssize_t archive_write_data(
struct archive *,
850 const void *,
size_t);
853 __LA_DECL la_ssize_t archive_write_data_block(
struct archive *,
854 const void *,
size_t, la_int64_t);
856 __LA_DECL
int archive_write_finish_entry(
struct archive *);
857 __LA_DECL
int archive_write_close(
struct archive *);
861 __LA_DECL
int archive_write_fail(
struct archive *);
864 __LA_DECL
int archive_write_free(
struct archive *);
865 #if ARCHIVE_VERSION_NUMBER < 4000000 867 __LA_DECL
int archive_write_finish(
struct archive *) __LA_DEPRECATED;
874 __LA_DECL
int archive_write_set_format_option(
struct archive *_a,
875 const char *m,
const char *o,
878 __LA_DECL
int archive_write_set_filter_option(
struct archive *_a,
879 const char *m,
const char *o,
882 __LA_DECL
int archive_write_set_option(
struct archive *_a,
883 const char *m,
const char *o,
886 __LA_DECL
int archive_write_set_options(
struct archive *_a,
892 __LA_DECL
int archive_write_set_passphrase(
struct archive *_a,
const char *p);
893 __LA_DECL
int archive_write_set_passphrase_callback(
struct archive *,
894 void *client_data, archive_passphrase_callback *);
912 __LA_DECL
struct archive *archive_write_disk_new(
void);
914 __LA_DECL
int archive_write_disk_set_skip_file(
struct archive *,
915 la_int64_t, la_int64_t);
918 __LA_DECL
int archive_write_disk_set_options(
struct archive *,
937 __LA_DECL
int archive_write_disk_set_standard_lookup(
struct archive *);
943 __LA_DECL
int archive_write_disk_set_group_lookup(
struct archive *,
945 la_int64_t (*)(
void *,
const char *, la_int64_t),
947 __LA_DECL
int archive_write_disk_set_user_lookup(
struct archive *,
949 la_int64_t (*)(
void *,
const char *, la_int64_t),
951 __LA_DECL la_int64_t archive_write_disk_gid(
struct archive *,
const char *, la_int64_t);
952 __LA_DECL la_int64_t archive_write_disk_uid(
struct archive *,
const char *, la_int64_t);
959 __LA_DECL
struct archive *archive_read_disk_new(
void);
963 __LA_DECL
int archive_read_disk_set_symlink_logical(
struct archive *);
965 __LA_DECL
int archive_read_disk_set_symlink_physical(
struct archive *);
967 __LA_DECL
int archive_read_disk_set_symlink_hybrid(
struct archive *);
969 __LA_DECL
int archive_read_disk_entry_from_file(
struct archive *,
970 struct archive_entry *,
int ,
const struct stat *);
973 __LA_DECL
const char *archive_read_disk_gname(
struct archive *, la_int64_t);
974 __LA_DECL
const char *archive_read_disk_uname(
struct archive *, la_int64_t);
977 __LA_DECL
int archive_read_disk_set_standard_lookup(
struct archive *);
979 __LA_DECL
int archive_read_disk_set_gname_lookup(
struct archive *,
981 const char *(* )(
void *, la_int64_t),
983 __LA_DECL
int archive_read_disk_set_uname_lookup(
struct archive *,
985 const char *(* )(
void *, la_int64_t),
988 __LA_DECL
int archive_read_disk_open(
struct archive *,
const char *);
989 __LA_DECL
int archive_read_disk_open_w(
struct archive *,
const wchar_t *);
997 __LA_DECL
int archive_read_disk_descend(
struct archive *);
998 __LA_DECL
int archive_read_disk_can_descend(
struct archive *);
999 __LA_DECL
int archive_read_disk_current_filesystem(
struct archive *);
1000 __LA_DECL
int archive_read_disk_current_filesystem_is_synthetic(
struct archive *);
1001 __LA_DECL
int archive_read_disk_current_filesystem_is_remote(
struct archive *);
1003 __LA_DECL
int archive_read_disk_set_atime_restored(
struct archive *);
1009 #define ARCHIVE_READDISK_RESTORE_ATIME (0x0001) 1011 #define ARCHIVE_READDISK_HONOR_NODUMP (0x0002) 1014 #define ARCHIVE_READDISK_MAC_COPYFILE (0x0004) 1016 #define ARCHIVE_READDISK_NO_TRAVERSE_MOUNTS (0x0008) 1018 #define ARCHIVE_READDISK_NO_XATTR (0x0010) 1020 #define ARCHIVE_READDISK_NO_ACL (0x0020) 1022 #define ARCHIVE_READDISK_NO_FFLAGS (0x0040) 1024 __LA_DECL
int archive_read_disk_set_behavior(
struct archive *,
1033 __LA_DECL
int archive_read_disk_set_matching(
struct archive *,
1034 struct archive *_matching,
void (*_excluded_func)
1035 (
struct archive *,
void *,
struct archive_entry *),
1036 void *_client_data);
1037 __LA_DECL
int archive_read_disk_set_metadata_filter_callback(
struct archive *,
1038 int (*_metadata_filter_func)(
struct archive *,
void *,
1039 struct archive_entry *),
void *_client_data);
1043 __LA_DECL
int archive_free(
struct archive *);
1054 __LA_DECL
int archive_filter_count(
struct archive *);
1055 __LA_DECL la_int64_t archive_filter_bytes(
struct archive *,
int);
1056 __LA_DECL
int archive_filter_code(
struct archive *,
int);
1057 __LA_DECL
const char * archive_filter_name(
struct archive *,
int);
1059 #if ARCHIVE_VERSION_NUMBER < 4000000 1063 __LA_DECL la_int64_t archive_position_compressed(
struct archive *)
1066 __LA_DECL la_int64_t archive_position_uncompressed(
struct archive *)
1069 __LA_DECL
const char *archive_compression_name(
struct archive *)
1072 __LA_DECL
int archive_compression(
struct archive *)
1076 __LA_DECL
int archive_errno(
struct archive *);
1077 __LA_DECL
const char *archive_error_string(
struct archive *);
1078 __LA_DECL
const char *archive_format_name(
struct archive *);
1079 __LA_DECL
int archive_format(
struct archive *);
1080 __LA_DECL
void archive_clear_error(
struct archive *);
1081 __LA_DECL
void archive_set_error(
struct archive *,
int _err,
1082 const char *fmt, ...) __LA_PRINTF(3, 4);
1083 __LA_DECL
void archive_copy_error(struct archive *dest,
1084 struct archive *src);
1085 __LA_DECL
int archive_file_count(struct archive *);
1090 __LA_DECL struct archive *archive_match_new(
void);
1091 __LA_DECL
int archive_match_free(struct archive *);
1099 __LA_DECL
int archive_match_excluded(struct archive *,
1100 struct archive_entry *);
1105 __LA_DECL
int archive_match_path_excluded(struct archive *,
1106 struct archive_entry *);
1108 __LA_DECL
int archive_match_set_inclusion_recursion(struct archive *,
int);
1110 __LA_DECL
int archive_match_exclude_pattern(struct archive *, const
char *);
1111 __LA_DECL
int archive_match_exclude_pattern_w(struct archive *,
1114 __LA_DECL
int archive_match_exclude_pattern_from_file(struct archive *,
1115 const
char *,
int _nullSeparator);
1116 __LA_DECL
int archive_match_exclude_pattern_from_file_w(struct archive *,
1117 const
wchar_t *,
int _nullSeparator);
1119 __LA_DECL
int archive_match_include_pattern(struct archive *, const
char *);
1120 __LA_DECL
int archive_match_include_pattern_w(struct archive *,
1123 __LA_DECL
int archive_match_include_pattern_from_file(struct archive *,
1124 const
char *,
int _nullSeparator);
1125 __LA_DECL
int archive_match_include_pattern_from_file_w(struct archive *,
1126 const
wchar_t *,
int _nullSeparator);
1131 __LA_DECL
int archive_match_path_unmatched_inclusions(struct archive *);
1134 __LA_DECL
int archive_match_path_unmatched_inclusions_next(
1135 struct archive *, const
char **);
1136 __LA_DECL
int archive_match_path_unmatched_inclusions_next_w(
1137 struct archive *, const
wchar_t **);
1143 __LA_DECL
int archive_match_time_excluded(struct archive *,
1144 struct archive_entry *);
1151 #define ARCHIVE_MATCH_MTIME (0x0100) 1153 #define ARCHIVE_MATCH_CTIME (0x0200) 1155 #define ARCHIVE_MATCH_NEWER (0x0001) 1157 #define ARCHIVE_MATCH_OLDER (0x0002) 1159 #define ARCHIVE_MATCH_EQUAL (0x0010) 1161 __LA_DECL
int archive_match_include_time(
struct archive *,
int _flag,
1162 time_t _sec,
long _nsec);
1164 __LA_DECL
int archive_match_include_date(
struct archive *,
int _flag,
1165 const char *_datestr);
1166 __LA_DECL
int archive_match_include_date_w(
struct archive *,
int _flag,
1167 const wchar_t *_datestr);
1169 __LA_DECL
int archive_match_include_file_time(
struct archive *,
1170 int _flag,
const char *_pathname);
1171 __LA_DECL
int archive_match_include_file_time_w(
struct archive *,
1172 int _flag,
const wchar_t *_pathname);
1174 __LA_DECL
int archive_match_exclude_entry(
struct archive *,
1175 int _flag,
struct archive_entry *);
1181 __LA_DECL
int archive_match_owner_excluded(
struct archive *,
1182 struct archive_entry *);
1184 __LA_DECL
int archive_match_include_uid(
struct archive *, la_int64_t);
1185 __LA_DECL
int archive_match_include_gid(
struct archive *, la_int64_t);
1186 __LA_DECL
int archive_match_include_uname(
struct archive *,
const char *);
1187 __LA_DECL
int archive_match_include_uname_w(
struct archive *,
1189 __LA_DECL
int archive_match_include_gname(
struct archive *,
const char *);
1190 __LA_DECL
int archive_match_include_gname_w(
struct archive *,
1195 __LA_DECL
int archive_utility_string_sort(
char **);