Documentation

Archive
in package

Class for creating archives in various formats - zip, tar.bz2, etc

Table of Contents

Properties

$driver  : mixed
$paths  : mixed

Methods

__construct()  : void
Loads the archive driver.
add()  : object
Adds files or directories, recursively, to an archive.
create()  : string|bool
Creates a raw archive file and returns it.
save()  : bool
Creates an archive and saves it into a file.

Properties

Methods

__construct()

Loads the archive driver.

public __construct([string|null $type = null ]) : void
Parameters
$type : string|null = null

Type of archive to create

Tags
throws
Kohana_Exception

add()

Adds files or directories, recursively, to an archive.

public add(string $path[, string|null $name = null ][, bool|null $recursive = null ]) : object
Parameters
$path : string

File or directory to add

$name : string|null = null

Name to use for the given file or directory

$recursive : bool|null = null

Add files recursively, used with directories

Return values
object

create()

Creates a raw archive file and returns it.

public create() : string|bool
Return values
string|bool

save()

Creates an archive and saves it into a file.

public save(string $filename) : bool
Parameters
$filename : string

Archive filename

Tags
throws
Kohana_Exception
Return values
bool
On this page

Search results