Tariqa
3.0
|
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 |
Zip file creation class. Makes zip files.
Last Modification and Extension By :
Hasin Hayder HomePage : www.hasinme.info Email : count IDE : PHP Designer 2005 drac ulla@ gmai l.com
Originally Based on :
http://www.zend.com/codex.php?id=535&single=1 By Eric Mueller eric@ them epark .com
http://www.zend.com/codex.php?id=470&single=1 by Denis125 webma ster @atla nt.r u
a patch from Peter Listiak mlady for last modified date and time of the compressed file @use rs.so urce forge .net
Official ZIP file format: http://www.pkware.com/appnote.txt
public
addDir | ( | $ | name | ) |
Adds "directory" to archive - do this before putting any files in directory!
string | $name | Name 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
string | file contents |
string | name of the file in the archive (may contains the path) |
integer | the current timestamp |
public
addFiles | ( | $ | files | ) |
A Wrapper of original addFile Function
Created By Hasin Hayder at 29th Jan, 1:29 AM
array | An Array of files with relative/absolute path to be added in Zip File |
public
file | ( | ) |
Dumps out file
public
output | ( | $ | file | ) |
A Wrapper of original file Function
Created By Hasin Hayder at 29th Jan, 1:29 AM
string | Output 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).
integer | the current Unix timestamp |
private
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