Jelix 1.8.13

jZipCreator
in package

Class to create a zip file.

Tags
subpackage

utils

see
http://www.pkware.com/business_and_developers/developer/appnote/

Official ZIP file format

Table of Contents

$centralDirectory  : array<string|int, mixed>
Contains the central directory.
$centralDirOffset  : int
Offset of the central directory.
$fileRecords  : array<string|int, mixed>
contains all file records.
addContentFile()  : mixed
add a "logical" file to the zip archive.
addDir()  : mixed
adds the content of a directory to the zip archive.
addEmptyDir()  : mixed
adds an empty dir to the zip file.
getContent()  : string
create the contenu of the zip file.
_addCentralDirEntry()  : mixed
_getDOSTimeFormat()  : mixed

Properties

$centralDirectory

Contains the central directory.

protected array<string|int, mixed> $centralDirectory = array()
Tags

$centralDirOffset

Offset of the central directory.

protected int $centralDirOffset = 0
Tags

$fileRecords

contains all file records.

protected array<string|int, mixed> $fileRecords = array()
Tags

Methods

addContentFile()

add a "logical" file to the zip archive.

public addContentFile(string $zipFileName, string $content, int $filetime) : mixed
Parameters
$zipFileName : string

the path of the file into the zip archive

$content : string

the content of the file

$filetime : int

the time modification of the file

Tags
Return values
mixed

addDir()

adds the content of a directory to the zip archive.

public addDir(string $path[, string $zipDirPath = '' ][, bool $recursive = false ]) : mixed
Parameters
$path : string

the path of the physical directory you want to add

$zipDirPath : string = ''
$recursive : bool = false
Tags
throws
jException
Return values
mixed

addEmptyDir()

adds an empty dir to the zip file.

public addEmptyDir(mixed $name, mixed $time) : mixed
Parameters
$name : mixed
$time : mixed
Tags
Return values
mixed

getContent()

create the contenu of the zip file.

public getContent() : string
Tags
Return values
string

the content of the zip file

_addCentralDirEntry()

protected _addCentralDirEntry(mixed $name, mixed $info[, mixed $isDir = false ]) : mixed
Parameters
$name : mixed
$info : mixed
$isDir : mixed = false
Tags
Return values
mixed

_getDOSTimeFormat()

protected _getDOSTimeFormat(mixed $timestamp) : mixed
Parameters
$timestamp : mixed
Tags
Return values
mixed

Search results