Tariqa  3.0
 All Data Structures Namespaces Files Functions Variables Enumerations
zipfile Class Reference

Public Member Functions

 unix2DosTime ($unixtime=0)
 addDir ($name)
 addFile ($data, $name, $time=0)
 file ()
 addFiles ($files)
 output ($file)

Data Fields

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

Detailed Description

Zip file creation class. Makes zip files.

Last Modification and Extension By :

Hasin Hayder HomePage : www.hasinme.info Email : count.nosp@m.drac.nosp@m.ulla@.nosp@m.gmai.nosp@m.l.com IDE : PHP Designer 2005

Originally 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

public


Member Function Documentation

addDir ( name)

Adds "directory" to archive - do this before putting any files in directory!

Parameters:
string$nameName of directory... like this: "path/" ...then you can add files using add_file with names like "path/file.txt"
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

public

addFiles ( files)

A Wrapper of original addFile Function

Created By Hasin Hayder at 29th Jan, 1:29 AM

Parameters:
arrayAn Array of files with relative/absolute path to be added in Zip File

public

file ( )

Dumps out file

Returns:
string the zipped file

public

output ( file)

A Wrapper of original file Function

Created By Hasin Hayder at 29th Jan, 1:29 AM

Parameters:
stringOutput file name

public

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

private


Field Documentation

array $ctrl_dir = array()

Central directory

array $datasec = array()

Array to store compressed data

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

End of central directory record

integer $old_offset = 0

Last offset position


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