1ZIP_SET_FILE_EXTRA(3) Library Functions Manual ZIP_SET_FILE_EXTRA(3)
2
3
4
6 zip_set_file_extra - set extra field for file in zip
7
9 libzip (-lzip)
10
12 #include <zip.h>
13
14 int zip_set_file_extra(struct zip *archive, zip_uint64_t index); "const
15 char *extra" "int len"
16
18 The zip_set_file_extra function sets the extra field for the file at
19 position index in the zip archive to extra of length len. If extra is
20 NULL and len is 0, the file extra field will be removed.
21
23 Upon successful completion 0 is returned. Otherwise, -1 is returned
24 and the error information in archive is set to indicate the error.
25
27 zip_set_file_extra fails if:
28
29 [ZIP_ER_INVAL]
30 index is not a valid file index in archive, or len is less
31 than 0 or longer than the maximum extra field length in a
32 zip file (65535).
33
34 [ZIP_ER_MEMORY]
35 Required memory could not be allocated.
36
38 libzip(3), zip_get_file_extra(3)
39
41 Dieter Baron <dillo@giga.or.at> and Thomas Klausner <tk@giga.or.at>
42
43
44
45NiH February 13, 2011 ZIP_SET_FILE_EXTRA(3)