Cheetah
Public Member Functions | Public Attributes | List of all members
zipfile Class Reference

Public Member Functions

 unix2DosTime ($unixtime=0)
 
 addFile ($data, $name, $time=0)
 
 file ()
 

Public Attributes

 $datasec = array()
 
 $ctrl_dir = array()
 
 $eof_ctrl_dir = "\x50\x4b\x05\x06\x00\x00\x00\x00"
 
 $old_offset = 0
 

Detailed Description

Version
Id
zip.lib.php 10240 2007-04-01 11:02:46Z cybot_tm

Zip file creation class. Makes zip files.

Based on :

http://www.zend.com/codex.php?id=535&single=1 By Eric Mueller eric@.nosp@m.them.nosp@m.epark.nosp@m..com

http://www.zend.com/codex.php?id=470&single=1 by Denis125 webma.nosp@m.ster.nosp@m.@atla.nosp@m.nt.r.nosp@m.u

a patch from Peter Listiak mlady.nosp@m.@use.nosp@m.rs.so.nosp@m.urce.nosp@m.forge.nosp@m..net for last modified date and time of the compressed file

Official ZIP file format: http://www.pkware.com/appnote.txt

@access public

Definition at line 27 of file zip.lib.php.

Member Function Documentation

◆ addFile()

zipfile::addFile (   $data,
  $name,
  $time = 0 
)

Adds "file" to archive

Parameters
stringfile contents
stringname of the file in the archive (may contains the path)
integerthe current timestamp

@access public

Definition at line 94 of file zip.lib.php.

◆ file()

zipfile::file ( )

Dumps out file

Returns
string the zipped file

@access public

Definition at line 173 of file zip.lib.php.

◆ unix2DosTime()

zipfile::unix2DosTime (   $unixtime = 0)

Converts an Unix timestamp to a four byte DOS date and time format (date in high two bytes, time in low two bytes allowing magnitude comparison).

Parameters
integerthe current Unix timestamp
Returns
integer the current date in a four byte DOS format

@access private

Definition at line 68 of file zip.lib.php.

Member Data Documentation

◆ $ctrl_dir

array zipfile::$ctrl_dir = array()

Central directory

Definition at line 41 of file zip.lib.php.

◆ $datasec

array zipfile::$datasec = array()

Array to store compressed data

Definition at line 34 of file zip.lib.php.

◆ $eof_ctrl_dir

string zipfile::$eof_ctrl_dir = "\x50\x4b\x05\x06\x00\x00\x00\x00"

End of central directory record

Definition at line 48 of file zip.lib.php.

◆ $old_offset

integer zipfile::$old_offset = 0

Last offset position

Definition at line 55 of file zip.lib.php.


The documentation for this class was generated from the following file: