[ Index ]
 

Code source de Horde 3.1.3

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/lib/Horde/Compress/ -> zip.php (sommaire)

For decompress(), return a list of files/information about the zipfile.

Poids: 408 lignes (15 kb)
Inclus ou requis:0 fois
Référencé: 0 fois
Nécessite: 0 fichiers

Définit 1 class

Horde_Compress_zip:: (8 méthodes):
  compress()
  decompress()
  _getZipInfo()
  _getZipData()
  checkZipData()
  _unix2DOSTime()
  _addToZIPFile()
  _createZIPFile()


Classe: Horde_Compress_zip  - X-Ref

The Horde_Compress_zip class allows ZIP files to be created and
read.

$Horde: framework/Compress/Compress/zip.php,v 1.11.12.16 2006/06/29 08:34:30 jan Exp $

The ZIP compression code is partially based on code from:
Eric Mueller <eric@themepark.com>
http://www.zend.com/codex.php?id=535&single=1

Deins125 <webmaster@atlant.ru>
http://www.zend.com/codex.php?id=470&single=1

The ZIP compression date code is partially based on code from
Peter Listiak <mlady@users.sourceforge.net>

Copyright 2000-2006 Chuck Hagenbuch <chuck@horde.org>
Copyright 2002-2006 Michael Cochrane <mike@graftonhall.co.nz>
Copyright 2003-2006 Michael Slusarz <slusarz@bigworm.colorado.edu>

See the enclosed file COPYING for license information (LGPL). If you
did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.

compress($data, $params = array()   X-Ref
Create a ZIP compressed file from an array of file data.

param: array $data    The data to compress.
param: array $params  The parameter array (Unused).
return: string  The ZIP file.

decompress($data, $params)   X-Ref
Decompress a ZIP file and get information from it.

param: string $data   The zipfile data.
param: array $params  The parameter array.
return: mixed  The requested data.

_getZipInfo(&$data)   X-Ref
Get the list of files/data from the zip archive.

param: string &$data  The zipfile data.
return: array  KEY: Position in zipfile

_getZipData(&$data, &$info, $key)   X-Ref
Returns the data for a specific archived file.

param: string &$data  The zip archive contents.
param: array &$info   The information array from _getZipInfo().
param: integer $key   The position of the file in the archive.
return: string  The file data.

checkZipData(&$data)   X-Ref
Checks to see if the data is a valid ZIP file.

param: string &$data  The ZIP file data.
return: boolean  True if valid, false if invalid.

_unix2DOSTime($unixtime = null)   X-Ref
Converts a UNIX timestamp to a 4-byte DOS date and time format
(date in high 2-bytes, time in low 2-bytes allowing magnitude
comparison).

param: integer $unixtime  The current UNIX timestamp.
return: integer  The current date in a 4-byte DOS format.

_addToZIPFile(&$file, &$contents, &$ctrldir)   X-Ref
Adds a "file" to the ZIP archive.

param: array &$file      See Horde_Compress_zip::createZipFile().
param: array &$contents  An array of existing zipped files.
param: array &$ctrldir   An array of central directory information.

_createZIPFile(&$contents, &$ctrlDir)   X-Ref
Creates the ZIP file.
Official ZIP file format: http://www.pkware.com/appnote.txt

return: string  The ZIP file.



Généré le : Sun Feb 25 18:01:28 2007 par Balluche grâce à PHPXref 0.7