"Fossies" - the Fresh Open Source Software Archive

Member "libzip-1.6.0/man/zip_dir_add.mdoc" (24 Jan 2020, 3249 Bytes) of package /linux/misc/libzip-1.6.0.tar.xz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "zip_dir_add.mdoc": 1.5.2_vs_1.6.0.

    1 .\" zip_dir_add.mdoc -- add directory to zip archive
    2 .\" Copyright (C) 2006-2019 Dieter Baron and Thomas Klausner
    3 .\"
    4 .\" This file is part of libzip, a library to manipulate ZIP archives.
    5 .\" The authors can be contacted at <libzip@nih.at>
    6 .\"
    7 .\" Redistribution and use in source and binary forms, with or without
    8 .\" modification, are permitted provided that the following conditions
    9 .\" are met:
   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
   15 .\"    distribution.
   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.
   19 .\"
   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.
   31 .\"
   32 .Dd December 18, 2017
   33 .Dt ZIP_DIR_ADD 3
   34 .Os
   35 .Sh NAME
   36 .Nm zip_dir_add
   37 .Nd add directory to zip archive
   38 .Sh LIBRARY
   39 libzip (-lzip)
   40 .Sh SYNOPSIS
   41 .In zip.h
   42 .Ft zip_int64_t
   43 .Fn zip_dir_add "zip_t *archive" "const char *name" "zip_flags_t flags"
   44 .Sh DESCRIPTION
   45 The function
   46 .Fn zip_dir_add
   47 adds a directory to a zip archive.
   48 The argument
   49 .Ar archive
   50 specifies the zip archive to which the directory should be added.
   51 .Ar name
   52 is the directory's name in the zip archive.
   53 The
   54 .Ar flags
   55 argument can be any of:
   56 .Bl -tag -width XZIPXFLXENCXSTRICTXX
   57 .It Dv ZIP_FL_ENC_GUESS
   58 Guess encoding of
   59 .Ar name
   60 (default).
   61 .It Dv ZIP_FL_ENC_UTF_8
   62 Interpret
   63 .Ar name
   64 as UTF-8.
   65 .It Dv ZIP_FL_ENC_CP437
   66 Interpret
   67 .Ar name
   68 as code page 437 (CP-437).
   69 .El
   70 .Sh RETURN VALUES
   71 Upon successful completion, the index of the new entry in the archive
   72 is returned.
   73 Otherwise, \-1 is returned and the error code in
   74 .Ar archive
   75 is set to indicate the error.
   76 .Sh ERRORS
   77 .Fn zip_dir_add
   78 fails if:
   79 .Bl -tag -width Er
   80 .It Bq Er ZIP_ER_EXISTS
   81 There is already an entry called
   82 .Ar name
   83 in the archive.
   84 .It Bq Er ZIP_ER_INVAL
   85 .Ar archive
   86 or
   87 .Ar name
   88 are
   89 .Dv NULL ,
   90 or invalid UTF-8 encoded file names.
   91 .It Bq Er ZIP_ER_MEMORY
   92 Required memory could not be allocated.
   93 .El
   94 .Sh SEE ALSO
   95 .Xr libzip 3 ,
   96 .Xr zip_file_add 3
   97 .Sh HISTORY
   98 .Fn zip_dir_add
   99 was added in libzip 0.11.
  100 .Sh AUTHORS
  101 .An -nosplit
  102 .An Dieter Baron Aq Mt dillo@nih.at
  103 and
  104 .An Thomas Klausner Aq Mt tk@giga.or.at
  105 .Sh CAVEATS
  106 .Fn zip_dir_add
  107 does not look in the file system, it just creates one entry in the
  108 archive for the provided name.