File indexing completed on 2025-09-18 09:38:48
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026 #ifndef ARCHIVE_H_INCLUDED
0027 #define ARCHIVE_H_INCLUDED
0028
0029
0030
0031
0032
0033
0034
0035
0036
0037 #define ARCHIVE_VERSION_NUMBER 3008000
0038
0039 #include <sys/stat.h>
0040 #include <stddef.h> /* for wchar_t */
0041 #include <stdio.h> /* For FILE * */
0042 #if ARCHIVE_VERSION_NUMBER < 4000000
0043
0044 #include <time.h> /* For time_t */
0045 #endif
0046
0047
0048
0049
0050
0051
0052
0053
0054 #if defined(__BORLANDC__) && __BORLANDC__ >= 0x560
0055 # include <stdint.h>
0056 #elif !defined(__WATCOMC__) && !defined(_MSC_VER) && !defined(__INTERIX) && !defined(__BORLANDC__) && !defined(_SCO_DS) && !defined(__osf__) && !defined(__CLANG_INTTYPES_H)
0057 # include <inttypes.h>
0058 #endif
0059
0060
0061 #if !defined(__LA_INT64_T_DEFINED)
0062
0063 # if ARCHIVE_VERSION_NUMBER < 4000000
0064 #define __LA_INT64_T la_int64_t
0065 # endif
0066 #define __LA_INT64_T_DEFINED
0067 # if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__WATCOMC__)
0068 typedef __int64 la_int64_t;
0069 typedef unsigned __int64 la_uint64_t;
0070 # else
0071 # include <unistd.h> /* ssize_t */
0072 # if defined(_SCO_DS) || defined(__osf__)
0073 typedef long long la_int64_t;
0074 typedef unsigned long long la_uint64_t;
0075 # else
0076 typedef int64_t la_int64_t;
0077 typedef uint64_t la_uint64_t;
0078 # endif
0079 # endif
0080 #endif
0081
0082
0083 #if !defined(__LA_SSIZE_T_DEFINED)
0084
0085 # if ARCHIVE_VERSION_NUMBER < 4000000
0086 #define __LA_SSIZE_T la_ssize_t
0087 # endif
0088 #define __LA_SSIZE_T_DEFINED
0089 # if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__WATCOMC__)
0090 # if defined(_SSIZE_T_DEFINED) || defined(_SSIZE_T_)
0091 typedef ssize_t la_ssize_t;
0092 # elif defined(_WIN64)
0093 typedef __int64 la_ssize_t;
0094 # else
0095 typedef long la_ssize_t;
0096 # endif
0097 # else
0098 # include <unistd.h> /* ssize_t */
0099 typedef ssize_t la_ssize_t;
0100 # endif
0101 #endif
0102
0103 #if ARCHIVE_VERSION_NUMBER < 4000000
0104
0105 #define __LA_TIME_T time_t
0106 #else
0107
0108 #define __LA_TIME_T la_int64_t
0109 #endif
0110
0111 #if ARCHIVE_VERSION_NUMBER < 4000000
0112
0113 #define __LA_DEV_T dev_t
0114 #else
0115
0116 #define __LA_DEV_T la_int64_t
0117 #endif
0118
0119
0120 #if defined(__LIBARCHIVE_BUILD) && defined(__ANDROID__)
0121 #include "android_lf.h"
0122 #endif
0123
0124
0125
0126
0127
0128
0129 #if ((defined __WIN32__) || (defined _WIN32) || defined(__CYGWIN__)) && (!defined LIBARCHIVE_STATIC)
0130 # ifdef __LIBARCHIVE_BUILD
0131 # ifdef __GNUC__
0132 # define __LA_DECL __attribute__((dllexport)) extern
0133 # else
0134 # define __LA_DECL __declspec(dllexport)
0135 # endif
0136 # else
0137 # ifdef __GNUC__
0138 # define __LA_DECL
0139 # else
0140 # define __LA_DECL __declspec(dllimport)
0141 # endif
0142 # endif
0143 #elif defined __LIBARCHIVE_ENABLE_VISIBILITY
0144 # define __LA_DECL __attribute__((visibility("default")))
0145 #else
0146
0147 # define __LA_DECL
0148 #endif
0149
0150 #if defined(__GNUC__) && __GNUC__ >= 3 && !defined(__MINGW32__)
0151 #define __LA_PRINTF(fmtarg, firstvararg) \
0152 __attribute__((__format__ (__printf__, fmtarg, firstvararg)))
0153 #else
0154 #define __LA_PRINTF(fmtarg, firstvararg)
0155 #endif
0156
0157 #if defined(__GNUC__) && (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1))
0158 # define __LA_DEPRECATED __attribute__((deprecated))
0159 #else
0160 # define __LA_DEPRECATED
0161 #endif
0162
0163 #ifdef __cplusplus
0164 extern "C" {
0165 #endif
0166
0167
0168
0169
0170
0171
0172
0173
0174
0175 __LA_DECL int archive_version_number(void);
0176
0177
0178
0179
0180 #define ARCHIVE_VERSION_ONLY_STRING "3.8.0"
0181 #define ARCHIVE_VERSION_STRING "libarchive " ARCHIVE_VERSION_ONLY_STRING
0182 __LA_DECL const char * archive_version_string(void);
0183
0184
0185
0186
0187
0188
0189
0190
0191 __LA_DECL const char * archive_version_details(void);
0192
0193
0194
0195
0196
0197
0198 __LA_DECL const char * archive_zlib_version(void);
0199 __LA_DECL const char * archive_liblzma_version(void);
0200 __LA_DECL const char * archive_bzlib_version(void);
0201 __LA_DECL const char * archive_liblz4_version(void);
0202 __LA_DECL const char * archive_libzstd_version(void);
0203 __LA_DECL const char * archive_liblzo2_version(void);
0204 __LA_DECL const char * archive_libexpat_version(void);
0205 __LA_DECL const char * archive_libbsdxml_version(void);
0206 __LA_DECL const char * archive_libxml2_version(void);
0207 __LA_DECL const char * archive_mbedtls_version(void);
0208 __LA_DECL const char * archive_nettle_version(void);
0209 __LA_DECL const char * archive_openssl_version(void);
0210 __LA_DECL const char * archive_libmd_version(void);
0211 __LA_DECL const char * archive_commoncrypto_version(void);
0212 __LA_DECL const char * archive_cng_version(void);
0213 __LA_DECL const char * archive_wincrypt_version(void);
0214 __LA_DECL const char * archive_librichacl_version(void);
0215 __LA_DECL const char * archive_libacl_version(void);
0216 __LA_DECL const char * archive_libattr_version(void);
0217 __LA_DECL const char * archive_libiconv_version(void);
0218 __LA_DECL const char * archive_libpcre_version(void);
0219 __LA_DECL const char * archive_libpcre2_version(void);
0220
0221
0222 struct archive;
0223 struct archive_entry;
0224
0225
0226
0227
0228
0229
0230 #define ARCHIVE_EOF 1
0231 #define ARCHIVE_OK 0
0232 #define ARCHIVE_RETRY (-10)
0233 #define ARCHIVE_WARN (-20)
0234
0235 #define ARCHIVE_FAILED (-25)
0236
0237 #define ARCHIVE_FATAL (-30)
0238
0239
0240
0241
0242
0243
0244
0245
0246
0247
0248
0249
0250
0251
0252
0253
0254
0255
0256
0257
0258
0259
0260
0261 typedef la_ssize_t archive_read_callback(struct archive *,
0262 void *_client_data, const void **_buffer);
0263
0264
0265
0266
0267
0268
0269 typedef la_int64_t archive_skip_callback(struct archive *,
0270 void *_client_data, la_int64_t request);
0271
0272
0273
0274
0275
0276 typedef la_int64_t archive_seek_callback(struct archive *,
0277 void *_client_data, la_int64_t offset, int whence);
0278
0279
0280 typedef la_ssize_t archive_write_callback(struct archive *,
0281 void *_client_data,
0282 const void *_buffer, size_t _length);
0283
0284 typedef int archive_open_callback(struct archive *, void *_client_data);
0285
0286 typedef int archive_close_callback(struct archive *, void *_client_data);
0287
0288 typedef int archive_free_callback(struct archive *, void *_client_data);
0289
0290
0291
0292
0293
0294 typedef int archive_switch_callback(struct archive *, void *_client_data1,
0295 void *_client_data2);
0296
0297
0298
0299
0300
0301 typedef const char *archive_passphrase_callback(struct archive *,
0302 void *_client_data);
0303
0304
0305
0306
0307 #define ARCHIVE_FILTER_NONE 0
0308 #define ARCHIVE_FILTER_GZIP 1
0309 #define ARCHIVE_FILTER_BZIP2 2
0310 #define ARCHIVE_FILTER_COMPRESS 3
0311 #define ARCHIVE_FILTER_PROGRAM 4
0312 #define ARCHIVE_FILTER_LZMA 5
0313 #define ARCHIVE_FILTER_XZ 6
0314 #define ARCHIVE_FILTER_UU 7
0315 #define ARCHIVE_FILTER_RPM 8
0316 #define ARCHIVE_FILTER_LZIP 9
0317 #define ARCHIVE_FILTER_LRZIP 10
0318 #define ARCHIVE_FILTER_LZOP 11
0319 #define ARCHIVE_FILTER_GRZIP 12
0320 #define ARCHIVE_FILTER_LZ4 13
0321 #define ARCHIVE_FILTER_ZSTD 14
0322
0323 #if ARCHIVE_VERSION_NUMBER < 4000000
0324 #define ARCHIVE_COMPRESSION_NONE ARCHIVE_FILTER_NONE
0325 #define ARCHIVE_COMPRESSION_GZIP ARCHIVE_FILTER_GZIP
0326 #define ARCHIVE_COMPRESSION_BZIP2 ARCHIVE_FILTER_BZIP2
0327 #define ARCHIVE_COMPRESSION_COMPRESS ARCHIVE_FILTER_COMPRESS
0328 #define ARCHIVE_COMPRESSION_PROGRAM ARCHIVE_FILTER_PROGRAM
0329 #define ARCHIVE_COMPRESSION_LZMA ARCHIVE_FILTER_LZMA
0330 #define ARCHIVE_COMPRESSION_XZ ARCHIVE_FILTER_XZ
0331 #define ARCHIVE_COMPRESSION_UU ARCHIVE_FILTER_UU
0332 #define ARCHIVE_COMPRESSION_RPM ARCHIVE_FILTER_RPM
0333 #define ARCHIVE_COMPRESSION_LZIP ARCHIVE_FILTER_LZIP
0334 #define ARCHIVE_COMPRESSION_LRZIP ARCHIVE_FILTER_LRZIP
0335 #endif
0336
0337
0338
0339
0340
0341
0342
0343
0344
0345
0346
0347
0348
0349
0350
0351
0352
0353 #define ARCHIVE_FORMAT_BASE_MASK 0xff0000
0354 #define ARCHIVE_FORMAT_CPIO 0x10000
0355 #define ARCHIVE_FORMAT_CPIO_POSIX (ARCHIVE_FORMAT_CPIO | 1)
0356 #define ARCHIVE_FORMAT_CPIO_BIN_LE (ARCHIVE_FORMAT_CPIO | 2)
0357 #define ARCHIVE_FORMAT_CPIO_BIN_BE (ARCHIVE_FORMAT_CPIO | 3)
0358 #define ARCHIVE_FORMAT_CPIO_SVR4_NOCRC (ARCHIVE_FORMAT_CPIO | 4)
0359 #define ARCHIVE_FORMAT_CPIO_SVR4_CRC (ARCHIVE_FORMAT_CPIO | 5)
0360 #define ARCHIVE_FORMAT_CPIO_AFIO_LARGE (ARCHIVE_FORMAT_CPIO | 6)
0361 #define ARCHIVE_FORMAT_CPIO_PWB (ARCHIVE_FORMAT_CPIO | 7)
0362 #define ARCHIVE_FORMAT_SHAR 0x20000
0363 #define ARCHIVE_FORMAT_SHAR_BASE (ARCHIVE_FORMAT_SHAR | 1)
0364 #define ARCHIVE_FORMAT_SHAR_DUMP (ARCHIVE_FORMAT_SHAR | 2)
0365 #define ARCHIVE_FORMAT_TAR 0x30000
0366 #define ARCHIVE_FORMAT_TAR_USTAR (ARCHIVE_FORMAT_TAR | 1)
0367 #define ARCHIVE_FORMAT_TAR_PAX_INTERCHANGE (ARCHIVE_FORMAT_TAR | 2)
0368 #define ARCHIVE_FORMAT_TAR_PAX_RESTRICTED (ARCHIVE_FORMAT_TAR | 3)
0369 #define ARCHIVE_FORMAT_TAR_GNUTAR (ARCHIVE_FORMAT_TAR | 4)
0370 #define ARCHIVE_FORMAT_ISO9660 0x40000
0371 #define ARCHIVE_FORMAT_ISO9660_ROCKRIDGE (ARCHIVE_FORMAT_ISO9660 | 1)
0372 #define ARCHIVE_FORMAT_ZIP 0x50000
0373 #define ARCHIVE_FORMAT_EMPTY 0x60000
0374 #define ARCHIVE_FORMAT_AR 0x70000
0375 #define ARCHIVE_FORMAT_AR_GNU (ARCHIVE_FORMAT_AR | 1)
0376 #define ARCHIVE_FORMAT_AR_BSD (ARCHIVE_FORMAT_AR | 2)
0377 #define ARCHIVE_FORMAT_MTREE 0x80000
0378 #define ARCHIVE_FORMAT_RAW 0x90000
0379 #define ARCHIVE_FORMAT_XAR 0xA0000
0380 #define ARCHIVE_FORMAT_LHA 0xB0000
0381 #define ARCHIVE_FORMAT_CAB 0xC0000
0382 #define ARCHIVE_FORMAT_RAR 0xD0000
0383 #define ARCHIVE_FORMAT_7ZIP 0xE0000
0384 #define ARCHIVE_FORMAT_WARC 0xF0000
0385 #define ARCHIVE_FORMAT_RAR_V5 0x100000
0386
0387
0388
0389
0390
0391
0392
0393
0394
0395 #define ARCHIVE_READ_FORMAT_CAPS_NONE (0)
0396 #define ARCHIVE_READ_FORMAT_CAPS_ENCRYPT_DATA (1<<0)
0397 #define ARCHIVE_READ_FORMAT_CAPS_ENCRYPT_METADATA (1<<1)
0398
0399
0400
0401
0402
0403
0404
0405
0406
0407
0408 #define ARCHIVE_READ_FORMAT_ENCRYPTION_UNSUPPORTED -2
0409 #define ARCHIVE_READ_FORMAT_ENCRYPTION_DONT_KNOW -1
0410
0411
0412
0413
0414
0415
0416
0417
0418
0419
0420
0421
0422
0423 __LA_DECL struct archive *archive_read_new(void);
0424
0425
0426
0427
0428
0429
0430
0431
0432
0433 #if ARCHIVE_VERSION_NUMBER < 4000000
0434 __LA_DECL int archive_read_support_compression_all(struct archive *)
0435 __LA_DEPRECATED;
0436 __LA_DECL int archive_read_support_compression_bzip2(struct archive *)
0437 __LA_DEPRECATED;
0438 __LA_DECL int archive_read_support_compression_compress(struct archive *)
0439 __LA_DEPRECATED;
0440 __LA_DECL int archive_read_support_compression_gzip(struct archive *)
0441 __LA_DEPRECATED;
0442 __LA_DECL int archive_read_support_compression_lzip(struct archive *)
0443 __LA_DEPRECATED;
0444 __LA_DECL int archive_read_support_compression_lzma(struct archive *)
0445 __LA_DEPRECATED;
0446 __LA_DECL int archive_read_support_compression_none(struct archive *)
0447 __LA_DEPRECATED;
0448 __LA_DECL int archive_read_support_compression_program(struct archive *,
0449 const char *command) __LA_DEPRECATED;
0450 __LA_DECL int archive_read_support_compression_program_signature
0451 (struct archive *, const char *,
0452 const void * , size_t) __LA_DEPRECATED;
0453
0454 __LA_DECL int archive_read_support_compression_rpm(struct archive *)
0455 __LA_DEPRECATED;
0456 __LA_DECL int archive_read_support_compression_uu(struct archive *)
0457 __LA_DEPRECATED;
0458 __LA_DECL int archive_read_support_compression_xz(struct archive *)
0459 __LA_DEPRECATED;
0460 #endif
0461
0462 __LA_DECL int archive_read_support_filter_all(struct archive *);
0463 __LA_DECL int archive_read_support_filter_by_code(struct archive *, int);
0464 __LA_DECL int archive_read_support_filter_bzip2(struct archive *);
0465 __LA_DECL int archive_read_support_filter_compress(struct archive *);
0466 __LA_DECL int archive_read_support_filter_gzip(struct archive *);
0467 __LA_DECL int archive_read_support_filter_grzip(struct archive *);
0468 __LA_DECL int archive_read_support_filter_lrzip(struct archive *);
0469 __LA_DECL int archive_read_support_filter_lz4(struct archive *);
0470 __LA_DECL int archive_read_support_filter_lzip(struct archive *);
0471 __LA_DECL int archive_read_support_filter_lzma(struct archive *);
0472 __LA_DECL int archive_read_support_filter_lzop(struct archive *);
0473 __LA_DECL int archive_read_support_filter_none(struct archive *);
0474 __LA_DECL int archive_read_support_filter_program(struct archive *,
0475 const char *command);
0476 __LA_DECL int archive_read_support_filter_program_signature
0477 (struct archive *, const char * ,
0478 const void * , size_t);
0479 __LA_DECL int archive_read_support_filter_rpm(struct archive *);
0480 __LA_DECL int archive_read_support_filter_uu(struct archive *);
0481 __LA_DECL int archive_read_support_filter_xz(struct archive *);
0482 __LA_DECL int archive_read_support_filter_zstd(struct archive *);
0483
0484 __LA_DECL int archive_read_support_format_7zip(struct archive *);
0485 __LA_DECL int archive_read_support_format_all(struct archive *);
0486 __LA_DECL int archive_read_support_format_ar(struct archive *);
0487 __LA_DECL int archive_read_support_format_by_code(struct archive *, int);
0488 __LA_DECL int archive_read_support_format_cab(struct archive *);
0489 __LA_DECL int archive_read_support_format_cpio(struct archive *);
0490 __LA_DECL int archive_read_support_format_empty(struct archive *);
0491
0492
0493 __LA_DECL int archive_read_support_format_gnutar(struct archive *);
0494 __LA_DECL int archive_read_support_format_iso9660(struct archive *);
0495 __LA_DECL int archive_read_support_format_lha(struct archive *);
0496 __LA_DECL int archive_read_support_format_mtree(struct archive *);
0497 __LA_DECL int archive_read_support_format_rar(struct archive *);
0498 __LA_DECL int archive_read_support_format_rar5(struct archive *);
0499 __LA_DECL int archive_read_support_format_raw(struct archive *);
0500 __LA_DECL int archive_read_support_format_tar(struct archive *);
0501 __LA_DECL int archive_read_support_format_warc(struct archive *);
0502 __LA_DECL int archive_read_support_format_xar(struct archive *);
0503
0504
0505 __LA_DECL int archive_read_support_format_zip(struct archive *);
0506
0507
0508
0509 __LA_DECL int archive_read_support_format_zip_streamable(struct archive *);
0510
0511 __LA_DECL int archive_read_support_format_zip_seekable(struct archive *);
0512
0513
0514
0515
0516
0517 __LA_DECL int archive_read_set_format(struct archive *, int);
0518 __LA_DECL int archive_read_append_filter(struct archive *, int);
0519 __LA_DECL int archive_read_append_filter_program(struct archive *,
0520 const char *);
0521 __LA_DECL int archive_read_append_filter_program_signature
0522 (struct archive *, const char *, const void * , size_t);
0523
0524
0525 __LA_DECL int archive_read_set_open_callback(struct archive *,
0526 archive_open_callback *);
0527 __LA_DECL int archive_read_set_read_callback(struct archive *,
0528 archive_read_callback *);
0529 __LA_DECL int archive_read_set_seek_callback(struct archive *,
0530 archive_seek_callback *);
0531 __LA_DECL int archive_read_set_skip_callback(struct archive *,
0532 archive_skip_callback *);
0533 __LA_DECL int archive_read_set_close_callback(struct archive *,
0534 archive_close_callback *);
0535
0536 __LA_DECL int archive_read_set_switch_callback(struct archive *,
0537 archive_switch_callback *);
0538
0539
0540 __LA_DECL int archive_read_set_callback_data(struct archive *, void *);
0541
0542 __LA_DECL int archive_read_set_callback_data2(struct archive *, void *,
0543 unsigned int);
0544
0545 __LA_DECL int archive_read_add_callback_data(struct archive *, void *,
0546 unsigned int);
0547
0548 __LA_DECL int archive_read_append_callback_data(struct archive *, void *);
0549
0550 __LA_DECL int archive_read_prepend_callback_data(struct archive *, void *);
0551
0552
0553 __LA_DECL int archive_read_open1(struct archive *);
0554
0555
0556 __LA_DECL int archive_read_open(struct archive *, void *_client_data,
0557 archive_open_callback *, archive_read_callback *,
0558 archive_close_callback *);
0559 __LA_DECL int archive_read_open2(struct archive *, void *_client_data,
0560 archive_open_callback *, archive_read_callback *,
0561 archive_skip_callback *, archive_close_callback *);
0562
0563
0564
0565
0566
0567
0568
0569 __LA_DECL int archive_read_open_filename(struct archive *,
0570 const char *_filename, size_t _block_size);
0571
0572
0573 __LA_DECL int archive_read_open_filenames(struct archive *,
0574 const char **_filenames, size_t _block_size);
0575 __LA_DECL int archive_read_open_filename_w(struct archive *,
0576 const wchar_t *_filename, size_t _block_size);
0577 #if defined(_WIN32) && !defined(__CYGWIN__)
0578 __LA_DECL int archive_read_open_filenames_w(struct archive *,
0579 const wchar_t **_filenames, size_t _block_size);
0580 #endif
0581
0582 __LA_DECL int archive_read_open_file(struct archive *,
0583 const char *_filename, size_t _block_size) __LA_DEPRECATED;
0584
0585 __LA_DECL int archive_read_open_memory(struct archive *,
0586 const void * buff, size_t size);
0587
0588 __LA_DECL int archive_read_open_memory2(struct archive *a, const void *buff,
0589 size_t size, size_t read_size);
0590
0591 __LA_DECL int archive_read_open_fd(struct archive *, int _fd,
0592 size_t _block_size);
0593
0594
0595 __LA_DECL int archive_read_open_FILE(struct archive *, FILE *_file);
0596
0597
0598 __LA_DECL int archive_read_next_header(struct archive *,
0599 struct archive_entry **);
0600
0601
0602 __LA_DECL int archive_read_next_header2(struct archive *,
0603 struct archive_entry *);
0604
0605
0606
0607
0608
0609 __LA_DECL la_int64_t archive_read_header_position(struct archive *);
0610
0611
0612
0613
0614
0615
0616
0617
0618
0619
0620
0621
0622
0623
0624
0625
0626
0627
0628
0629 __LA_DECL int archive_read_has_encrypted_entries(struct archive *);
0630
0631
0632
0633
0634
0635 __LA_DECL int archive_read_format_capabilities(struct archive *);
0636
0637
0638 __LA_DECL la_ssize_t archive_read_data(struct archive *,
0639 void *, size_t);
0640
0641
0642 __LA_DECL la_int64_t archive_seek_data(struct archive *, la_int64_t, int);
0643
0644
0645
0646
0647
0648
0649
0650 __LA_DECL int archive_read_data_block(struct archive *a,
0651 const void **buff, size_t *size, la_int64_t *offset);
0652
0653
0654
0655
0656
0657
0658
0659 __LA_DECL int archive_read_data_skip(struct archive *);
0660 __LA_DECL int archive_read_data_into_fd(struct archive *, int fd);
0661
0662
0663
0664
0665
0666 __LA_DECL int archive_read_set_format_option(struct archive *_a,
0667 const char *m, const char *o,
0668 const char *v);
0669
0670 __LA_DECL int archive_read_set_filter_option(struct archive *_a,
0671 const char *m, const char *o,
0672 const char *v);
0673
0674 __LA_DECL int archive_read_set_option(struct archive *_a,
0675 const char *m, const char *o,
0676 const char *v);
0677
0678 __LA_DECL int archive_read_set_options(struct archive *_a,
0679 const char *opts);
0680
0681
0682
0683
0684 __LA_DECL int archive_read_add_passphrase(struct archive *, const char *);
0685 __LA_DECL int archive_read_set_passphrase_callback(struct archive *,
0686 void *client_data, archive_passphrase_callback *);
0687
0688
0689
0690
0691
0692
0693
0694
0695
0696
0697
0698
0699
0700
0701
0702
0703
0704
0705
0706 #define ARCHIVE_EXTRACT_OWNER (0x0001)
0707
0708 #define ARCHIVE_EXTRACT_PERM (0x0002)
0709
0710 #define ARCHIVE_EXTRACT_TIME (0x0004)
0711
0712 #define ARCHIVE_EXTRACT_NO_OVERWRITE (0x0008)
0713
0714 #define ARCHIVE_EXTRACT_UNLINK (0x0010)
0715
0716 #define ARCHIVE_EXTRACT_ACL (0x0020)
0717
0718 #define ARCHIVE_EXTRACT_FFLAGS (0x0040)
0719
0720 #define ARCHIVE_EXTRACT_XATTR (0x0080)
0721
0722
0723 #define ARCHIVE_EXTRACT_SECURE_SYMLINKS (0x0100)
0724
0725 #define ARCHIVE_EXTRACT_SECURE_NODOTDOT (0x0200)
0726
0727 #define ARCHIVE_EXTRACT_NO_AUTODIR (0x0400)
0728
0729 #define ARCHIVE_EXTRACT_NO_OVERWRITE_NEWER (0x0800)
0730
0731 #define ARCHIVE_EXTRACT_SPARSE (0x1000)
0732
0733
0734 #define ARCHIVE_EXTRACT_MAC_METADATA (0x2000)
0735
0736
0737 #define ARCHIVE_EXTRACT_NO_HFS_COMPRESSION (0x4000)
0738
0739
0740 #define ARCHIVE_EXTRACT_HFS_COMPRESSION_FORCED (0x8000)
0741
0742 #define ARCHIVE_EXTRACT_SECURE_NOABSOLUTEPATHS (0x10000)
0743
0744 #define ARCHIVE_EXTRACT_CLEAR_NOCHANGE_FFLAGS (0x20000)
0745
0746 #define ARCHIVE_EXTRACT_SAFE_WRITES (0x40000)
0747
0748 __LA_DECL int archive_read_extract(struct archive *, struct archive_entry *,
0749 int flags);
0750 __LA_DECL int archive_read_extract2(struct archive *, struct archive_entry *,
0751 struct archive * );
0752 __LA_DECL void archive_read_extract_set_progress_callback(struct archive *,
0753 void (*_progress_func)(void *), void *_user_data);
0754
0755
0756
0757 __LA_DECL void archive_read_extract_set_skip_file(struct archive *,
0758 la_int64_t, la_int64_t);
0759
0760
0761 __LA_DECL int archive_read_close(struct archive *);
0762
0763
0764 __LA_DECL int archive_read_free(struct archive *);
0765 #if ARCHIVE_VERSION_NUMBER < 4000000
0766
0767 __LA_DECL int archive_read_finish(struct archive *) __LA_DEPRECATED;
0768 #endif
0769
0770
0771
0772
0773
0774
0775
0776
0777
0778
0779
0780
0781
0782
0783
0784
0785 __LA_DECL struct archive *archive_write_new(void);
0786 __LA_DECL int archive_write_set_bytes_per_block(struct archive *,
0787 int bytes_per_block);
0788 __LA_DECL int archive_write_get_bytes_per_block(struct archive *);
0789
0790 __LA_DECL int archive_write_set_bytes_in_last_block(struct archive *,
0791 int bytes_in_last_block);
0792 __LA_DECL int archive_write_get_bytes_in_last_block(struct archive *);
0793
0794
0795
0796 __LA_DECL int archive_write_set_skip_file(struct archive *,
0797 la_int64_t, la_int64_t);
0798
0799 #if ARCHIVE_VERSION_NUMBER < 4000000
0800 __LA_DECL int archive_write_set_compression_bzip2(struct archive *)
0801 __LA_DEPRECATED;
0802 __LA_DECL int archive_write_set_compression_compress(struct archive *)
0803 __LA_DEPRECATED;
0804 __LA_DECL int archive_write_set_compression_gzip(struct archive *)
0805 __LA_DEPRECATED;
0806 __LA_DECL int archive_write_set_compression_lzip(struct archive *)
0807 __LA_DEPRECATED;
0808 __LA_DECL int archive_write_set_compression_lzma(struct archive *)
0809 __LA_DEPRECATED;
0810 __LA_DECL int archive_write_set_compression_none(struct archive *)
0811 __LA_DEPRECATED;
0812 __LA_DECL int archive_write_set_compression_program(struct archive *,
0813 const char *cmd) __LA_DEPRECATED;
0814 __LA_DECL int archive_write_set_compression_xz(struct archive *)
0815 __LA_DEPRECATED;
0816 #endif
0817
0818
0819 __LA_DECL int archive_write_add_filter(struct archive *, int filter_code);
0820 __LA_DECL int archive_write_add_filter_by_name(struct archive *,
0821 const char *name);
0822 __LA_DECL int archive_write_add_filter_b64encode(struct archive *);
0823 __LA_DECL int archive_write_add_filter_bzip2(struct archive *);
0824 __LA_DECL int archive_write_add_filter_compress(struct archive *);
0825 __LA_DECL int archive_write_add_filter_grzip(struct archive *);
0826 __LA_DECL int archive_write_add_filter_gzip(struct archive *);
0827 __LA_DECL int archive_write_add_filter_lrzip(struct archive *);
0828 __LA_DECL int archive_write_add_filter_lz4(struct archive *);
0829 __LA_DECL int archive_write_add_filter_lzip(struct archive *);
0830 __LA_DECL int archive_write_add_filter_lzma(struct archive *);
0831 __LA_DECL int archive_write_add_filter_lzop(struct archive *);
0832 __LA_DECL int archive_write_add_filter_none(struct archive *);
0833 __LA_DECL int archive_write_add_filter_program(struct archive *,
0834 const char *cmd);
0835 __LA_DECL int archive_write_add_filter_uuencode(struct archive *);
0836 __LA_DECL int archive_write_add_filter_xz(struct archive *);
0837 __LA_DECL int archive_write_add_filter_zstd(struct archive *);
0838
0839
0840
0841 __LA_DECL int archive_write_set_format(struct archive *, int format_code);
0842 __LA_DECL int archive_write_set_format_by_name(struct archive *,
0843 const char *name);
0844
0845 __LA_DECL int archive_write_set_format_7zip(struct archive *);
0846 __LA_DECL int archive_write_set_format_ar_bsd(struct archive *);
0847 __LA_DECL int archive_write_set_format_ar_svr4(struct archive *);
0848 __LA_DECL int archive_write_set_format_cpio(struct archive *);
0849 __LA_DECL int archive_write_set_format_cpio_bin(struct archive *);
0850 __LA_DECL int archive_write_set_format_cpio_newc(struct archive *);
0851 __LA_DECL int archive_write_set_format_cpio_odc(struct archive *);
0852 __LA_DECL int archive_write_set_format_cpio_pwb(struct archive *);
0853 __LA_DECL int archive_write_set_format_gnutar(struct archive *);
0854 __LA_DECL int archive_write_set_format_iso9660(struct archive *);
0855 __LA_DECL int archive_write_set_format_mtree(struct archive *);
0856 __LA_DECL int archive_write_set_format_mtree_classic(struct archive *);
0857
0858 __LA_DECL int archive_write_set_format_pax(struct archive *);
0859 __LA_DECL int archive_write_set_format_pax_restricted(struct archive *);
0860 __LA_DECL int archive_write_set_format_raw(struct archive *);
0861 __LA_DECL int archive_write_set_format_shar(struct archive *);
0862 __LA_DECL int archive_write_set_format_shar_dump(struct archive *);
0863 __LA_DECL int archive_write_set_format_ustar(struct archive *);
0864 __LA_DECL int archive_write_set_format_v7tar(struct archive *);
0865 __LA_DECL int archive_write_set_format_warc(struct archive *);
0866 __LA_DECL int archive_write_set_format_xar(struct archive *);
0867 __LA_DECL int archive_write_set_format_zip(struct archive *);
0868 __LA_DECL int archive_write_set_format_filter_by_ext(struct archive *a, const char *filename);
0869 __LA_DECL int archive_write_set_format_filter_by_ext_def(struct archive *a, const char *filename, const char * def_ext);
0870 __LA_DECL int archive_write_zip_set_compression_deflate(struct archive *);
0871 __LA_DECL int archive_write_zip_set_compression_store(struct archive *);
0872 __LA_DECL int archive_write_zip_set_compression_lzma(struct archive *);
0873 __LA_DECL int archive_write_zip_set_compression_xz(struct archive *);
0874 __LA_DECL int archive_write_zip_set_compression_bzip2(struct archive *);
0875 __LA_DECL int archive_write_zip_set_compression_zstd(struct archive *);
0876
0877 __LA_DECL int archive_write_open(struct archive *, void *,
0878 archive_open_callback *, archive_write_callback *,
0879 archive_close_callback *);
0880 __LA_DECL int archive_write_open2(struct archive *, void *,
0881 archive_open_callback *, archive_write_callback *,
0882 archive_close_callback *, archive_free_callback *);
0883 __LA_DECL int archive_write_open_fd(struct archive *, int _fd);
0884 __LA_DECL int archive_write_open_filename(struct archive *, const char *_file);
0885 __LA_DECL int archive_write_open_filename_w(struct archive *,
0886 const wchar_t *_file);
0887
0888 __LA_DECL int archive_write_open_file(struct archive *, const char *_file)
0889 __LA_DEPRECATED;
0890 __LA_DECL int archive_write_open_FILE(struct archive *, FILE *);
0891
0892
0893 __LA_DECL int archive_write_open_memory(struct archive *,
0894 void *_buffer, size_t _buffSize, size_t *_used);
0895
0896
0897
0898
0899
0900 __LA_DECL int archive_write_header(struct archive *,
0901 struct archive_entry *);
0902 __LA_DECL la_ssize_t archive_write_data(struct archive *,
0903 const void *, size_t);
0904
0905
0906 __LA_DECL la_ssize_t archive_write_data_block(struct archive *,
0907 const void *, size_t, la_int64_t);
0908
0909 __LA_DECL int archive_write_finish_entry(struct archive *);
0910 __LA_DECL int archive_write_close(struct archive *);
0911
0912
0913
0914 __LA_DECL int archive_write_fail(struct archive *);
0915
0916
0917 __LA_DECL int archive_write_free(struct archive *);
0918 #if ARCHIVE_VERSION_NUMBER < 4000000
0919
0920 __LA_DECL int archive_write_finish(struct archive *) __LA_DEPRECATED;
0921 #endif
0922
0923
0924
0925
0926
0927 __LA_DECL int archive_write_set_format_option(struct archive *_a,
0928 const char *m, const char *o,
0929 const char *v);
0930
0931 __LA_DECL int archive_write_set_filter_option(struct archive *_a,
0932 const char *m, const char *o,
0933 const char *v);
0934
0935 __LA_DECL int archive_write_set_option(struct archive *_a,
0936 const char *m, const char *o,
0937 const char *v);
0938
0939 __LA_DECL int archive_write_set_options(struct archive *_a,
0940 const char *opts);
0941
0942
0943
0944
0945 __LA_DECL int archive_write_set_passphrase(struct archive *_a, const char *p);
0946 __LA_DECL int archive_write_set_passphrase_callback(struct archive *,
0947 void *client_data, archive_passphrase_callback *);
0948
0949
0950
0951
0952
0953
0954
0955
0956
0957
0958
0959
0960
0961
0962
0963
0964
0965 __LA_DECL struct archive *archive_write_disk_new(void);
0966
0967 __LA_DECL int archive_write_disk_set_skip_file(struct archive *,
0968 la_int64_t, la_int64_t);
0969
0970
0971 __LA_DECL int archive_write_disk_set_options(struct archive *,
0972 int flags);
0973
0974
0975
0976
0977
0978
0979
0980
0981
0982
0983
0984
0985
0986
0987
0988
0989
0990 __LA_DECL int archive_write_disk_set_standard_lookup(struct archive *);
0991
0992
0993
0994
0995
0996 __LA_DECL int archive_write_disk_set_group_lookup(struct archive *,
0997 void * ,
0998 la_int64_t (*)(void *, const char *, la_int64_t),
0999 void (* )(void *));
1000 __LA_DECL int archive_write_disk_set_user_lookup(struct archive *,
1001 void * ,
1002 la_int64_t (*)(void *, const char *, la_int64_t),
1003 void (* )(void *));
1004 __LA_DECL la_int64_t archive_write_disk_gid(struct archive *, const char *, la_int64_t);
1005 __LA_DECL la_int64_t archive_write_disk_uid(struct archive *, const char *, la_int64_t);
1006
1007
1008
1009
1010
1011
1012 __LA_DECL struct archive *archive_read_disk_new(void);
1013
1014
1015
1016 __LA_DECL int archive_read_disk_set_symlink_logical(struct archive *);
1017
1018 __LA_DECL int archive_read_disk_set_symlink_physical(struct archive *);
1019
1020 __LA_DECL int archive_read_disk_set_symlink_hybrid(struct archive *);
1021
1022 __LA_DECL int archive_read_disk_entry_from_file(struct archive *,
1023 struct archive_entry *, int , const struct stat *);
1024
1025
1026 __LA_DECL const char *archive_read_disk_gname(struct archive *, la_int64_t);
1027 __LA_DECL const char *archive_read_disk_uname(struct archive *, la_int64_t);
1028
1029
1030 __LA_DECL int archive_read_disk_set_standard_lookup(struct archive *);
1031
1032 __LA_DECL int archive_read_disk_set_gname_lookup(struct archive *,
1033 void * ,
1034 const char *(* )(void *, la_int64_t),
1035 void (* )(void *));
1036 __LA_DECL int archive_read_disk_set_uname_lookup(struct archive *,
1037 void * ,
1038 const char *(* )(void *, la_int64_t),
1039 void (* )(void *));
1040
1041 __LA_DECL int archive_read_disk_open(struct archive *, const char *);
1042 __LA_DECL int archive_read_disk_open_w(struct archive *, const wchar_t *);
1043
1044
1045
1046
1047
1048
1049
1050 __LA_DECL int archive_read_disk_descend(struct archive *);
1051 __LA_DECL int archive_read_disk_can_descend(struct archive *);
1052 __LA_DECL int archive_read_disk_current_filesystem(struct archive *);
1053 __LA_DECL int archive_read_disk_current_filesystem_is_synthetic(struct archive *);
1054 __LA_DECL int archive_read_disk_current_filesystem_is_remote(struct archive *);
1055
1056 __LA_DECL int archive_read_disk_set_atime_restored(struct archive *);
1057
1058
1059
1060
1061
1062 #define ARCHIVE_READDISK_RESTORE_ATIME (0x0001)
1063
1064 #define ARCHIVE_READDISK_HONOR_NODUMP (0x0002)
1065
1066
1067 #define ARCHIVE_READDISK_MAC_COPYFILE (0x0004)
1068
1069 #define ARCHIVE_READDISK_NO_TRAVERSE_MOUNTS (0x0008)
1070
1071 #define ARCHIVE_READDISK_NO_XATTR (0x0010)
1072
1073 #define ARCHIVE_READDISK_NO_ACL (0x0020)
1074
1075 #define ARCHIVE_READDISK_NO_FFLAGS (0x0040)
1076
1077 #define ARCHIVE_READDISK_NO_SPARSE (0x0080)
1078
1079 __LA_DECL int archive_read_disk_set_behavior(struct archive *,
1080 int flags);
1081
1082
1083
1084
1085
1086
1087
1088 __LA_DECL int archive_read_disk_set_matching(struct archive *,
1089 struct archive *_matching, void (*_excluded_func)
1090 (struct archive *, void *, struct archive_entry *),
1091 void *_client_data);
1092 __LA_DECL int archive_read_disk_set_metadata_filter_callback(struct archive *,
1093 int (*_metadata_filter_func)(struct archive *, void *,
1094 struct archive_entry *), void *_client_data);
1095
1096
1097
1098 __LA_DECL int archive_free(struct archive *);
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109 __LA_DECL int archive_filter_count(struct archive *);
1110 __LA_DECL la_int64_t archive_filter_bytes(struct archive *, int);
1111 __LA_DECL int archive_filter_code(struct archive *, int);
1112 __LA_DECL const char * archive_filter_name(struct archive *, int);
1113
1114 #if ARCHIVE_VERSION_NUMBER < 4000000
1115
1116
1117
1118 __LA_DECL la_int64_t archive_position_compressed(struct archive *)
1119 __LA_DEPRECATED;
1120
1121 __LA_DECL la_int64_t archive_position_uncompressed(struct archive *)
1122 __LA_DEPRECATED;
1123
1124 __LA_DECL const char *archive_compression_name(struct archive *)
1125 __LA_DEPRECATED;
1126
1127 __LA_DECL int archive_compression(struct archive *)
1128 __LA_DEPRECATED;
1129 #endif
1130
1131
1132
1133 __LA_DECL time_t archive_parse_date(time_t now, const char *datestr);
1134
1135 __LA_DECL int archive_errno(struct archive *);
1136 __LA_DECL const char *archive_error_string(struct archive *);
1137 __LA_DECL const char *archive_format_name(struct archive *);
1138 __LA_DECL int archive_format(struct archive *);
1139 __LA_DECL void archive_clear_error(struct archive *);
1140 __LA_DECL void archive_set_error(struct archive *, int _err,
1141 const char *fmt, ...) __LA_PRINTF(3, 4);
1142 __LA_DECL void archive_copy_error(struct archive *dest,
1143 struct archive *src);
1144 __LA_DECL int archive_file_count(struct archive *);
1145
1146
1147
1148
1149 __LA_DECL struct archive *archive_match_new(void);
1150 __LA_DECL int archive_match_free(struct archive *);
1151
1152
1153
1154
1155
1156
1157
1158 __LA_DECL int archive_match_excluded(struct archive *,
1159 struct archive_entry *);
1160
1161
1162
1163
1164 __LA_DECL int archive_match_path_excluded(struct archive *,
1165 struct archive_entry *);
1166
1167 __LA_DECL int archive_match_set_inclusion_recursion(struct archive *, int);
1168
1169 __LA_DECL int archive_match_exclude_pattern(struct archive *, const char *);
1170 __LA_DECL int archive_match_exclude_pattern_w(struct archive *,
1171 const wchar_t *);
1172
1173 __LA_DECL int archive_match_exclude_pattern_from_file(struct archive *,
1174 const char *, int _nullSeparator);
1175 __LA_DECL int archive_match_exclude_pattern_from_file_w(struct archive *,
1176 const wchar_t *, int _nullSeparator);
1177
1178 __LA_DECL int archive_match_include_pattern(struct archive *, const char *);
1179 __LA_DECL int archive_match_include_pattern_w(struct archive *,
1180 const wchar_t *);
1181
1182 __LA_DECL int archive_match_include_pattern_from_file(struct archive *,
1183 const char *, int _nullSeparator);
1184 __LA_DECL int archive_match_include_pattern_from_file_w(struct archive *,
1185 const wchar_t *, int _nullSeparator);
1186
1187
1188
1189
1190 __LA_DECL int archive_match_path_unmatched_inclusions(struct archive *);
1191
1192
1193 __LA_DECL int archive_match_path_unmatched_inclusions_next(
1194 struct archive *, const char **);
1195 __LA_DECL int archive_match_path_unmatched_inclusions_next_w(
1196 struct archive *, const wchar_t **);
1197
1198
1199
1200
1201
1202 __LA_DECL int archive_match_time_excluded(struct archive *,
1203 struct archive_entry *);
1204
1205
1206
1207
1208
1209
1210 #define ARCHIVE_MATCH_MTIME (0x0100)
1211
1212 #define ARCHIVE_MATCH_CTIME (0x0200)
1213
1214 #define ARCHIVE_MATCH_NEWER (0x0001)
1215
1216 #define ARCHIVE_MATCH_OLDER (0x0002)
1217
1218 #define ARCHIVE_MATCH_EQUAL (0x0010)
1219
1220 __LA_DECL int archive_match_include_time(struct archive *, int _flag,
1221 time_t _sec, long _nsec);
1222
1223 __LA_DECL int archive_match_include_date(struct archive *, int _flag,
1224 const char *_datestr);
1225 __LA_DECL int archive_match_include_date_w(struct archive *, int _flag,
1226 const wchar_t *_datestr);
1227
1228 __LA_DECL int archive_match_include_file_time(struct archive *,
1229 int _flag, const char *_pathname);
1230 __LA_DECL int archive_match_include_file_time_w(struct archive *,
1231 int _flag, const wchar_t *_pathname);
1232
1233 __LA_DECL int archive_match_exclude_entry(struct archive *,
1234 int _flag, struct archive_entry *);
1235
1236
1237
1238
1239
1240 __LA_DECL int archive_match_owner_excluded(struct archive *,
1241 struct archive_entry *);
1242
1243 __LA_DECL int archive_match_include_uid(struct archive *, la_int64_t);
1244 __LA_DECL int archive_match_include_gid(struct archive *, la_int64_t);
1245 __LA_DECL int archive_match_include_uname(struct archive *, const char *);
1246 __LA_DECL int archive_match_include_uname_w(struct archive *,
1247 const wchar_t *);
1248 __LA_DECL int archive_match_include_gname(struct archive *, const char *);
1249 __LA_DECL int archive_match_include_gname_w(struct archive *,
1250 const wchar_t *);
1251
1252
1253
1254 __LA_DECL int archive_utility_string_sort(char **);
1255
1256 #ifdef __cplusplus
1257 }
1258 #endif
1259
1260
1261 #undef __LA_DECL
1262
1263 #endif