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

NAME

4     zip_set_archive_flag — set zip archive flag
5

LIBRARY

7     libzip (-lzip)
8

SYNOPSIS

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

DESCRIPTION

16     The zip_set_archive_flag() function sets the flag flag for the archive
17     archive to the value value.
18
19     Supported flags are:
20
21     ZIP_AFL_CREATE_OR_KEEP_FILE_FOR_EMPTY_ARCHIVE
22                         If this flag is cleared, the archive file will be re‐
23                         moved if the archive is empty.  If it is set, an
24                         empty archive will be created, which is not recom‐
25                         mended by the zip specification.
26
27     ZIP_AFL_RDONLY      If this flag is set, no modification to the archive
28                         are allowed.  This flag can only be cleared if it was
29                         manually set with zip_set_archive_flag, not if the
30                         archive was opened read-only.
31
32     ZIP_AFL_WANT_TORRENTZIP
33                         If this flag is set, the archive will be written in
34                         torrentzip format.
35

RETURN VALUES

37     Upon successful completion 0 is returned, and -1 if an error occurred.
38

SEE ALSO

40     libzip(3), zip_get_archive_flag(3)
41

HISTORY

43     zip_set_archive_flag() was added in libzip 0.9.  In libzip 0.11 the type
44     of flag was changed from int to zip_flags_t.
45     ZIP_AFL_CREATE_OR_KEEP_FILE_FOR_EMPTY_ARCHIVE and ZIP_AFL_WANT_TORRENTZIP
46     were added in libzip 1.10.0.
47

AUTHORS

49     Dieter Baron <dillo@nih.at> and Thomas Klausner <tk@giga.or.at>
50
51BSD                              July 19, 2023                             BSD
Impressum