"Fossies" - the Fresh Open Source Software Archive

Member "libzip-1.6.0/man/zip_file_extra_field_delete.mdoc" (24 Jan 2020, 4195 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 last Fossies "Diffs" side-by-side code changes report for "zip_file_extra_field_delete.mdoc": 1.3.2_vs_1.4.0.

    1 .\" zip_file_extra_field_delete.mdoc -- delete extra field for file in zip
    2 .\" Copyright (C) 2012-2017 Dieter Baron and Thomas Klausner
    3 .\"
    4 .\" This file is part of libzip, a library to manipulate ZIP files.
    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_FILE_EXTRA_FIELD_DELETE 3
   34 .Os
   35 .Sh NAME
   36 .Nm zip_file_extra_field_delete ,
   37 .Nm zip_file_extra_field_delete_by_id
   38 .Nd delete extra field for file in zip
   39 .Sh LIBRARY
   40 libzip (-lzip)
   41 .Sh SYNOPSIS
   42 .In zip.h
   43 .Ft int
   44 .Fn zip_file_extra_field_delete "zip_t *archive" "zip_uint64_t index" "zip_uint16_t extra_field_index" "zip_flags_t flags"
   45 .Ft int
   46 .Fn zip_file_extra_field_delete_by_id "zip_t *archive" "zip_uint64_t index" "zip_uint16_t extra_field_id" "zip_uint16_t extra_field_index" "zip_flags_t flags"
   47 .Sh DESCRIPTION
   48 The
   49 .Fn zip_file_extra_field_delete
   50 function deletes the extra field with index
   51 .Ar extra_field_index
   52 for the file at position
   53 .Ar index
   54 in the zip archive.
   55 .Pp
   56 If
   57 .Ar extra_field_index
   58 is
   59 .Dv ZIP_EXTRA_FIELD_ALL ,
   60 then all extra fields will be deleted.
   61 .Pp
   62 The following
   63 .Ar flags
   64 are supported:
   65 .Bl -tag -width ZIP_FL_CENTRALXX -offset indent
   66 .It Dv ZIP_FL_CENTRAL
   67 Delete extra fields from the archive's central directory.
   68 .It Dv ZIP_FL_LOCAL
   69 Delete extra fields from the local file headers.
   70 .El
   71 .Pp
   72 The
   73 .Fn zip_file_extra_field_delete_by_id
   74 function deletes the extra field with ID (two-byte signature)
   75 .Ar extra_field_id
   76 and index
   77 .Ar extra_field_index
   78 (in other words, the
   79 .Ar extra_field_index Ns No 'th
   80 extra field with ID
   81 .Ar extra_field_id )
   82 The other arguments are the same as for
   83 .Fn zip_file_extra_field_delete
   84 .Dv ( ZIP_EXTRA_FIELD_ALL
   85 will delete all extra fields of the specified ID).
   86 .Pp
   87 Please note that due to the library design, the index of an extra
   88 field may be different between central directory and local file
   89 headers.
   90 For this reason, it is not allowed to specify both
   91 .Dv ZIP_FL_CENTRAL
   92 and
   93 .Dv ZIP_FL_LOCAL
   94 in
   95 .Ar flags ,
   96 except when deleting all extra fields (i.e.,
   97 .Ar extra_field_index
   98 being
   99 .Dv ZIP_EXTRA_FIELD_ALL ) .
  100 .Sh RETURN VALUES
  101 Upon successful completion 0 is returned.
  102 Otherwise, \-1 is returned and the error code in
  103 .Ar archive
  104 is set to indicate the error.
  105 .Sh ERRORS
  106 .Fn zip_file_extra_field_delete
  107 and
  108 .Fn zip_file_extra_field_delete_by_id
  109 fail if:
  110 .Bl -tag -width Er
  111 .It Bq Er ZIP_ER_NOENT
  112 .Ar index
  113 is not a valid file index in
  114 .Ar archive .
  115 .El
  116 .Sh SEE ALSO
  117 .Xr libzip 3 ,
  118 .Xr zip_file_extra_field_get 3 ,
  119 .Xr zip_file_extra_field_set 3 ,
  120 .Xr zip_file_extra_fields_count 3
  121 .Sh HISTORY
  122 .Fn zip_file_extra_field_delete
  123 and
  124 .Fn zip_file_extra_field_delete_by_id
  125 were added in libzip 0.11.
  126 .Sh AUTHORS
  127 .An -nosplit
  128 .An Dieter Baron Aq Mt dillo@nih.at
  129 and
  130 .An Thomas Klausner Aq Mt tk@giga.or.at