1ZIP_GET_ARCHIVE_FLAG(3)  BSD Library Functions Manual  ZIP_GET_ARCHIVE_FLAG(3)
2

NAME

4     zip_get_archive_flag — get status flags for zip
5

LIBRARY

7     libzip (-lzip)
8

SYNOPSIS

10     #include <zip.h>
11
12     int
13     zip_get_archive_flag(zip_t *archive, zip_flags_t flag,
14         zip_flags_t flags);
15

DESCRIPTION

17     The zip_get_archive_flag() function returns if the flag flag is set for
18     the archive archive.  The archive flags might have been changed with
19     zip_set_archive_flag(); if flags is set to ZIP_FL_UNCHANGED, the original
20     unchanged flags are tested.
21
22     Supported flags are:
23
24     ZIP_AFL_CREATE_OR_KEEP_FILE_FOR_EMPTY_ARCHIVE
25                         If this flag is cleared, the archive file will be re‐
26                         moved if the archive is empty.  If it is set, an
27                         empty archive will be created, which is not recom‐
28                         mended by the zip specification.  This flag is always
29                         cleared unless explicitly set by the user with
30                         zip_set_archive_flag(3).
31
32     ZIP_AFL_IS_TORRENTZIP
33                         The archive is in torrentzip format.
34
35     ZIP_AFL_RDONLY      The archive is read-only.
36
37     ZIP_AFL_WANT_TORRENTZIP
38                         If the flag is set, the archive will be written in
39                         torrentzip format.  This flag is always cleared un‐
40                         less explicitly set by the user with
41                         zip_set_archive_flag(3).
42

RETURN VALUES

44     zip_get_archive_flag() returns 1 if flag is set for archive, 0 if not,
45     and -1 if an error occurred.
46

SEE ALSO

48     libzip(3), zip_set_archive_flag(3)
49

HISTORY

51     zip_get_archive_flag() was added in libzip 0.9.  In libzip 0.11 the type
52     of flag was changed from int to zip_flags_t m and the type of flags was
53     changed from int to zip_flags_t.
54     ZIP_AFL_CREATE_OR_KEEP_FILE_FOR_EMPTY_ARCHIVE, ZIP_AFL_IS_TORRENTZIP, and
55     ZIP_AFL_WANT_TORRENTZIP were added in libzip 1.10.0.
56

AUTHORS

58     Dieter Baron <dillo@nih.at> and Thomas Klausner <tk@giga.or.at>
59
60BSD                            January 23, 2023                            BSD
Impressum