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