1 .\" zip_file_rename.mdoc -- rename file in zip archive
2 .\" Copyright (C) 2003-2014 Dieter Baron and Thomas Klausner
4 .\" This file is part of libzip, a library to manipulate ZIP archives.
5 .\" The authors can be contacted at <libzip@nih.at>
7 .\" Redistribution and use in source and binary forms, with or without
8 .\" modification, are permitted provided that the following conditions
10 .\" 1. Redistributions of source code must retain the above copyright
11 .\" notice, this list of conditions and the following disclaimer.
12 .\" 2. Redistributions in binary form must reproduce the above copyright
13 .\" notice, this list of conditions and the following disclaimer in
14 .\" the documentation and/or other materials provided with the
16 .\" 3. The names of the authors may not be used to endorse or promote
17 .\" products derived from this software without specific prior
18 .\" written permission.
20 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS
21 .\" OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
22 .\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY
24 .\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
26 .\" GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27 .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
28 .\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
29 .\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
30 .\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37 .Nd rename file in zip archive
43 .Fn zip_file_rename "zip_t *archive" "zip_uint64_t index" "const char *name" \
54 argument can be any of:
55 .Bl -tag -width XZIPXFLXENCXSTRICTXX
56 .It Dv ZIP_FL_ENC_GUESS
60 .It Dv ZIP_FL_ENC_UTF_8
64 .It Dv ZIP_FL_ENC_CP437
67 as code page 437 (CP-437).
70 Upon successful completion 0 is returned.
71 Otherwise, \-1 is returned and the error code in
73 is set to indicate the error.
78 .It Bq Er ZIP_ER_DELETED
79 The file to be renamed has been deleted from the archive.
80 .It Bq Er ZIP_ER_EXISTS
81 There is already a file called
84 .It Bq Er ZIP_ER_INVAL
86 is not a valid file index in
90 the empty string, or not a valid UTF-8 encoded string.
91 Also a file cannot be renamed to a directory or vice versa.
92 Directories are denoted by a trailing slash.
99 .An Dieter Baron Aq Mt dillo@nih.at
101 .An Thomas Klausner Aq Mt tk@giga.or.at