phpBB API Documentation
Class

compress_zip

class compress_zip extends compress

Zip creation class from phpMyAdmin 2.3.0 (c) Tobias Ratschiller, Olivier Müller, Loïc Chapeaux, Marc Delisle, http://www.phpmyadmin.net/

Zip extraction function by Alexandre Tedeschi, alexandrebr at gmail dot com

Modified extensively by psoTFX and DavidMJ, (c) phpBB Group, 2003

Based on work by Eric Mueller and Denis125 Official ZIP file format: http://www.pkware.com/appnote.txt

Properties

$fp
$datasec
$ctrl_dir
$eof_cdh
$old_offset
$datasec_len

Methods

add_file($src, $src_rm_prefix = '', $src_add_prefix = '', $skip_files = '')

Add file to archive

from compress
add_custom_file($src, $filename)

Add custom file (the filepath will not be adjusted)

from compress
add_data($src, $name)

Add file data

from compress
methods()

Return available methods

from compress
compress_zip($mode, $file)

Constructor

unix_to_dos_time($time)

Convert unix to dos time

extract($dst)

Extract archive

close()

Close archive

data($name, $data, $is_dir = false, $stat)

Create the structures ...

file()

file

download($filename, $download_name = false)

Download archive

Details

in compress at line 30
public add_file($src, $src_rm_prefix = '', $src_add_prefix = '', $skip_files = '')

Add file to archive

Parameters

$src
$src_rm_prefix
$src_add_prefix
$skip_files

in compress at line 101
public add_custom_file($src, $filename)

Add custom file (the filepath will not be adjusted)

Parameters

$src
$filename

in compress at line 115
public add_data($src, $name)

Add file data

Parameters

$src
$name

in compress at line 129
public methods()

Return available methods

at line 172
public compress_zip($mode, $file)

Constructor

Parameters

$mode
$file

at line 185
public unix_to_dos_time($time)

Convert unix to dos time

Parameters

$time

at line 202
public extract($dst)

Extract archive

Parameters

$dst

at line 349
public close()

Close archive

at line 362
public data($name, $data, $is_dir = false, $stat)

Create the structures ...

note we assume version made by is MSDOS

Parameters

$name
$data
$is_dir
$stat

at line 448
public file()

file

at line 463
public download($filename, $download_name = false)

Download archive

Parameters

$filename
$download_name