diff --git a/functions/zip.xml b/functions/zip.xml index b372e1ed35..fcd0cb8cde 100644 --- a/functions/zip.xml +++ b/functions/zip.xml @@ -1,46 +1,46 @@ - - - Zip File Functions (Read Only Access) - Zip - - - This module uses the functions of the ZZIPlib library by Guido Draheim to - transparently read ZIP compressed archives and the files - inside them. - - - Please note that ZZIPlib only provides a subset of functions - provided in a full implementation of the ZIP compression algorithm - and can only read ZIP file archives. A normal ZIP utility is - needed to create the ZIP file archives read by this library. - - - Zip support in PHP is not enabled by default. You will need to - use the --with-zip - configuration option when compiling PHP to enable zip - support. This module requires ZZIPlib version >= 0.10.6. - - + + + Zip File Functions (Read Only Access) + Zip + + This module uses the functions of the ZZIPlib library by Guido Draheim to + transparently read ZIP compressed archives and the files inside + them. + + + Please note that ZZIPlib only provides a subset of functions + provided in a full implementation of the ZIP compression algorithm + and can only read ZIP file archives. A normal ZIP utility is + needed to create the ZIP file archives read by this library. + + + Zip support in PHP is not enabled by default. You will need to + use the --with-zip + configuration option when compiling PHP to enable zip + support. This module requires ZZIPlib version >= 0.10.6. + + + Zip support before PHP 4.0.7 is experimental. This section reflects the Zip extension as it exists in PHP 4.0.7 and later. - - + + - - Example Usage - - This example opens a ZIP file archive, reads each file in the - archive and prints out its contents. The - test2.zip archive used in this example is - one of the test archives in the ZZIPlib source distribution. - - - Zip Usage Example - + + Example Usage + + This example opens a ZIP file archive, reads each file in the + archive and prints out its contents. The + test2.zip archive used in this example is + one of the test archives in the ZZIPlib source distribution. + + + Zip Usage Example + <?php $zip = zip_open("/tmp/test2.zip"); @@ -69,327 +69,337 @@ if ($zip) { } ?> - - - - + + + + - - - zip_close - Close a Zip File Archive + + + zip_close + Close a Zip File Archive - - Description - - - void zip_close - resource zip - - - - Closes a zip file archive. The parameter - zip must be a zip archive previously - opened by zip_open. - - - This function has no return value. - - - See also zip_open and - zip_read. - - - - - - - zip_entry_close - Close a Directory Entry - - - Description - - - void zip_entry_close - resource zip_entry - - - - Closes a directory entry specified by - zip_entry. The parameter - zip_entry must be a valid directory entry - opened by zip_entry_open. - - - This function has no return value. - - - See also zip_entry_open and - zip_entry_read. - - - - - - - zip_entry_compressedsize - Retrieve the Compressed Size of a Directory Entry - - - Description - - - int zip_entry_compressedsize - resource zip_entry - - - - Returns the compressed size of the directory entry specified by - zip_entry. The parameter - zip_entry is a valid directory entry - returned by zip_read. - - - See also zip_open and - zip_read. - - - - - - - zip_entry_compressionmethod - Retrieve the Compression Method of a Directory Entry - - - Description - - - string zip_entry_compressionmethod - resource zip_entry - - - - Returns the compression method of the directory entry specified by - zip_entry. The parameter - zip_entry is a valid directory entry - returned by zip_read. - - - See also zip_open and - zip_read. - - - - - - - zip_entry_filesize - Retrieve the Actual File Size of a Directory Entry - - - Description - - - int zip_entry_filesize - resource zip_entry - - - - Returns the actual size of the directory entry specified by - zip_entry. The parameter - zip_entry is a valid directory entry - returned by zip_read. - - - See also zip_open and - zip_read. - - - - - - - zip_entry_name - Retrieve the Name of a Directory Entry - - - Description - - - string zip_entry_name - resource zip_entry - - - - Returns the name of the directory entry specified by - zip_entry. The parameter - zip_entry is a valid directory entry - returned by zip_read. - - - See also zip_open and - zip_read. - - - - - - - zip_entry_open - Open a Directory Entry for Reading - - - Description - - - bool zip_entry_open - resource zip - resource zip_entry - string mode - - - - Opens a directory entry in a zip file for reading. The parameter - zip is a valid resource handle returned by - zip_open. The parameter - zip_entry is a directory entry resource - returned by zip_read. The optional parameter - mode can be any of the modes specified in - the documentaion for fopen. - - + + Description + + + void zip_close + resource zip + + - Currently, mode is ignored and is always - "rb". This is due to the fact that zip - support in PHP is read only access. Please see - fopen for an explanation of various modes, - including "rb". + Closes a zip file archive. The parameter + zip must be a zip archive previously + opened by zip_open. - - - Returns &true; on succes or &false; on failure. - - - Unlike fopen and other similar functions, - the return value of zip_entry_open only - indicates the result of the operation and is not needed for - reading or closing the directory entry. + This function has no return value. - - - See also zip_entry_read and - zip_entry_close. - - - - - - - zip_entry_read - Read From an Open Directory Entry - - - Description - - - string zip_entry_read - resource zip_entry - int length - - - - Reads up to length bytes from an open - directory entry. If length is not - specified, then zip_entry_read will attempt - to read 1024 bytes. The parameter - zip_entry is a valid directory entry - returned by zip_read. - - - The length parameter should be the - uncompressed length you wish to read. + See also zip_open and + zip_read. - - - Returns the data read, or &false; if the end of - the file is reached. - - - See also zip_entry_open, - zip_entry_close and - zip_entry_filesize. - - - + + - - - zip_open - Open a Zip File Archive - - - Description - - - resource zip_open - string filename - - - - Opens a new zip archive for reading. The - filename parameter is the filename of the - zip archive to open. - - - Returns a resource handle for later use with - zip_read and - zip_close or returns - &false; if filename does - not exist. - - - See also zip_read and - zip_close. - - - + + + zip_entry_close + Close a Directory Entry + + + Description + + + void zip_entry_close + resource zip_entry + + + + Closes a directory entry specified by + zip_entry. The parameter + zip_entry must be a valid directory entry + opened by zip_entry_open. + + + This function has no return value. + + + See also zip_entry_open and + zip_entry_read. + + + - - - zip_read - Read Next Entry in a Zip File Archive - - - Description - - - resource zip_read - resource zip - - - - Reads the next entry in a zip file archive. The parameter - zip must be a zip archive previously - opened by zip_open. - - - Returns a directory entry resource for later use with the - zip_entry_... functions. - - - See also zip_open, - zip_close, - zip_entry_open and - zip_entry_read. - - - - - + + + zip_entry_compressedsize + Retrieve the Compressed Size of a Directory Entry + + + Description + + + int + zip_entry_compressedsize + resource zip_entry + + + + Returns the compressed size of the directory entry specified by + zip_entry. The parameter + zip_entry is a valid directory entry + returned by zip_read. + + + See also zip_open and + zip_read. + + + + + + + zip_entry_compressionmethod + + Retrieve the Compression Method of a Directory Entry + + + + Description + + + string + zip_entry_compressionmethod + + resource zip_entry + + + + Returns the compression method of the directory entry specified + by zip_entry. The parameter + zip_entry is a valid directory entry + returned by zip_read. + + + See also zip_open and + zip_read. + + + + + + + zip_entry_filesize + + Retrieve the Actual File Size of a Directory Entry + + + + Description + + + int zip_entry_filesize + resource zip_entry + + + + Returns the actual size of the directory entry specified by + zip_entry. The parameter + zip_entry is a valid directory entry + returned by zip_read. + + + See also zip_open and + zip_read. + + + + + + + zip_entry_name + Retrieve the Name of a Directory Entry + + + Description + + + string zip_entry_name + resource zip_entry + + + + Returns the name of the directory entry specified by + zip_entry. The parameter + zip_entry is a valid directory entry + returned by zip_read. + + + See also zip_open and + zip_read. + + + + + + + zip_entry_open + Open a Directory Entry for Reading + + + Description + + + bool zip_entry_open + resource zip + resource zip_entry + string + mode + + + + + Opens a directory entry in a zip file for reading. The parameter + zip is a valid resource handle returned by + zip_open. The parameter + zip_entry is a directory entry resource + returned by zip_read. The optional + parameter mode can be any of the modes + specified in the documentaion for fopen. + + + + Currently, mode is ignored and is always + "rb". This is due to the fact that zip + support in PHP is read only access. Please see + fopen for an explanation of various modes, + including "rb". + + + + Returns &true; on succes or &false; on failure. + + + + Unlike fopen and other similar functions, + the return value of zip_entry_open only + indicates the result of the operation and is not needed for + reading or closing the directory entry. + + + + See also zip_entry_read and + zip_entry_close. + + + + + + + zip_entry_read + Read From an Open Directory Entry + + + Description + + + string zip_entry_read + resource zip_entry + int + length + + + + + Reads up to length bytes from an open + directory entry. If length is not + specified, then zip_entry_read will attempt + to read 1024 bytes. The parameter + zip_entry is a valid directory entry + returned by zip_read. + + + + The length parameter should be the + uncompressed length you wish to read. + + + + Returns the data read, or &false; if the end of the file is + reached. + + + See also zip_entry_open, + zip_entry_close and + zip_entry_filesize. + + + + + + + zip_open + Open a Zip File Archive + + + Description + + + resource zip_open + string filename + + + + Opens a new zip archive for reading. The + filename parameter is the filename of the + zip archive to open. + + + Returns a resource handle for later use with + zip_read and zip_close + or returns &false; if filename does not + exist. + + + See also zip_read and + zip_close. + + + + + + + zip_read + Read Next Entry in a Zip File Archive + + + Description + + + resource zip_read + resource zip + + + + Reads the next entry in a zip file archive. The parameter + zip must be a zip archive previously + opened by zip_open. + + + Returns a directory entry resource for later use with the + zip_entry_... functions. + + + See also zip_open, + zip_close, + zip_entry_open, and + zip_entry_read. + + + + +