1 .TH "ZIP_SOURCE_STAT" "3" "November 18, 2014" "NiH" "Library Functions Manual"
6 \- get information about zip_source
10 \fB#include <zip.h>\fR
15 \fBzip_source_stat\fR(\fIzip_source_t\ *source\fR, \fIzip_stat_t\ *sb\fR);
19 \fBzip_source_stat\fR()
20 function obtains information about the zip source
25 argument is a pointer to a
26 \fIstruct zip_source_stat\fR
27 (shown below), into which information about the zip source is placed.
31 struct zip_source_stat {
32 zip_uint64_t valid; /* which fields have valid values */
33 const char *name; /* name of the file */
34 zip_uint64_t index; /* index within archive */
35 zip_uint64_t size; /* size of file (uncompressed) */
36 zip_uint64_t comp_size; /* size of file (compressed) */
37 time_t mtime; /* modification time */
38 zip_uint32_t crc; /* crc of file data */
39 zip_uint16_t comp_method; /* compression method used */
40 zip_uint16_t encryption_method; /* encryption method used */
41 zip_uint32_t flags; /* reserved for future use */
45 The structure pointed to by
47 must be initialized with
48 \fBzip_stat_init\fR(\fI3\fR)
50 \fBzip_source_stat\fR().
54 field of the structure specifies which other fields are valid.
55 Check if the flag defined by the following defines are in
57 before accessing the fields:
61 \fRZIP_SOURCE_STAT_NAME\fR
64 \fRZIP_SOURCE_STAT_INDEX\fR
67 \fRZIP_SOURCE_STAT_SIZE\fR
70 \fRZIP_SOURCE_STAT_COMP_SIZE\fR
73 \fRZIP_SOURCE_STAT_MTIME\fR
76 \fRZIP_SOURCE_STAT_CRC\fR
79 \fRZIP_SOURCE_STAT_COMP_METHOD\fR
82 \fRZIP_SOURCE_STAT_ENCRYPTION_METHOD\fR
83 \fIencryption_method\fR
85 \fRZIP_SOURCE_STAT_FLAGS\fR
91 Some fields may only be filled out after all data has been read from
92 the source, for example the
98 Upon successful completion 0 is returned.
99 Otherwise, \-1 is returned and the error information in
101 is set to indicate the error.
106 Dieter Baron <\fIdillo@nih.at\fR>
108 Thomas Klausner <\fItk@giga.or.at\fR>