1ZIP_RENAME(3) Library Functions Manual ZIP_RENAME(3)
2
3
4
6 zip_rename - rename file in zip archive
7
9 libzip (-lzip)
10
12 #include <zip.h>
13
14 int zip_rename(struct zip *archive, zip_uint64_t index, const char
15 *name);
16
18 The file at position index in the zip archive archive is renamed to
19 name.
20
22 Upon successful completion 0 is returned. Otherwise, -1 is returned
23 and the error code in archive is set to indicate the error.
24
26 zip_rename fails if:
27
28 [ZIP_ER_DELETED]
29 The file to be renamed has been deleted from the archive.
30
31 [ZIP_ER_EXISTS]
32 There is already a file called name in the archive.
33
34 [ZIP_ER_INVAL]
35 index is not a valid file index in archive, name is NULL or
36 the empty string. Also a file cannot be renamed to a direcā
37 tory or vice versa. Directories are denoted by a trailing
38 slash.
39
41 libzip(3), zip_unchange(3)
42
44 Dieter Baron <dillo@giga.or.at> and Thomas Klausner <tk@giga.or.at>
45
46
47
48NiH March 10, 2009 ZIP_RENAME(3)