1ZZIP_OPEN(3) zziplib Function List ZZIP_OPEN(3)
2
3
4
6 zzip_open, zzip_open_ext_io, zzip_open_shared_io - ...
7
9 #include <zzip/lib.h>
10
11 ZZIP_FILE * zzip_open((zzip_char_t * filename, int o_flags));
12
13 ZZIP_FILE *
14 zzip_open_ext_io((zzip_char_t * filename, int o_flags, int o_modes, zzip_strings_t * ext, zzip_plugin_io_t io));
15
16 ZZIP_FILE *
17 zzip_open_shared_io((ZZIP_FILE * stream, zzip_char_t * filename, int o_flags, int o_modes, zzip_strings_t * ext, zzip_plugin_io_t io));
18
20 The zzip_open_ext_io function uses explicit ext and io instead of the
21 internal defaults, setting them to zero is equivalent to zzip_open
22
23 note that the two flag types have been split into an o_flags (for
24 fcntl-like openflags) and o_modes where the latter shall carry the
25 zzip_flags and possibly accessmodes for unix filesystems. Since this
26 version of zziplib can not write zipfiles, it is not yet used for
27 anything else than zzip-specific modeflags.
28
29 The zzip_open_ext_io function returns a new zzip-handle (use zzip_close
30 to return it). On error the zzip_open_ext_io function will return null
31 setting errno(3).
32
33 If any ext_io handlers were used then the referenced structure should
34 be static as the allocated ZZIP_FILE does not copy them.
35
36 The zzip_open_shared_io function takes an extra stream argument - if a
37 handle has been then ext/io can be left null and the new stream handle
38 will pick up the ext/io. This should be used only in specific
39 environment however since zzip_file_real does not store any
40 ext-sequence.
41
42 The benefit for the zzip_open_shared_io function comes in when the old
43 file handle was openened from a file within a zip archive. When the new
44 file is in the same zip archive then the internal zzip_dir structures
45 will be shared. It is even quicker, as no check needs to be done
46 anymore trying to guess the zip archive place in the filesystem, here
47 we just check whether the zip archive's filepath is a prefix part of
48 the filename to be opened.
49
50 Note that the zzip_open_shared_io function is also used by zzip_freopen
51 that will unshare the old handle, thereby possibly closing the handle.
52
53 The zzip_open_shared_io function returns a new zzip-handle (use
54 zzip_close to return it). On error the zzip_open_shared_io function
55 will return null setting errno(3).
56
58 ยท Guido Draheim <guidod@gmx.de> Tomi Ollila <Tomi.Ollila@iki.fi>
59
61 Copyright (c) 1999,2000,2001,2002,2003 Guido Draheim All rights
62 reserved, use under the restrictions of the Lesser GNU General Public
63 License or alternatively the restrictions of the Mozilla Public License
64 1.1
65
66
67
68zziplib 0.13.62 ZZIP_OPEN(3)