jZipCreator

Class to create a zip file.

package

jelix

subpackage

utils

link

Official ZIP file format

Methods

_addCentralDirEntry

_addCentralDirEntry( $name,  $info,  $isDir = false) 

Arguments

$name

$info

$isDir

_getDOSTimeFormat

_getDOSTimeFormat( $timestamp) 

Arguments

$timestamp

add a "logical" file to the zip archive

addContentFile(string $zipFileName, string $content, integer $filetime) 

Arguments

$zipFileName

string

the path of the file into the zip archive

$content

string

the content of the file

$filetime

integer

the time modification of the file

adds the content of a directory to the zip archive

addDir(string $path, string $zipDirPath = '', boolean $recursive = false) 
Throws
\jException

Arguments

$path

string

the path of the physical directory you want to add

$zipDirPath

string

$recursive

boolean

adds an empty dir to the zip file

addEmptyDir( $name,  $time) 

Arguments

$name

$time

create the contenu of the zip file

getContent() : string

Response

string

the content of the zip file

Properties

contains all file records

fileRecords : array
var

Type(s)

array

Contains the central directory

centralDirectory : array
var

Type(s)

array

Offset of the central directory

centralDirOffset : integer
var

Type(s)

integer