(PHP 5 >= 5.2.0, PHP 7, PECL zip >= 1.1.0)
Introduction
A file archive, compressed with Zip.
Class synopsis
addEmptyDir
(
string $dirname
[,
int $flags
= 0
] ) :
bool
addFile
(
string $filename
[,
string $localname
= NULL
[,
int $start
= 0
[,
int $length
= 0
[,
int $flags
= ZipArchive::FL_OVERWRITE
]]]] ) :
bool
addFromString
(
string $localname
,
string $contents
[,
int $flags
= ZipArchive::FL_OVERWRITE
] ) :
bool
addGlob
(
string $pattern
[,
int $flags
= 0
[,
array $options
= array()
]] ) :
array
addPattern
(
string $pattern
[,
string $path
= "."
[,
array $options
= array()
]] ) :
array
public count
(
void
) :
int
getFromIndex
(
int $index
[,
int $length
= 0
[,
int $flags
]] ) :
string
getFromName
(
string $name
[,
int $length
= 0
[,
int $flags
]] ) :
string
open
(
string $filename
[,
int $flags
] ) :
mixed
renameName
(
string $name
,
string $newname
) :
bool
replaceFile
(
string $filename
,
int $index
[,
int $start
= 0
[,
int $length
= 0
[,
int $flags
= 0
]]] ) :
bool
setMtimeIndex
(
int $index
,
int $timestamp
[,
int $flags
] ) :
bool
setMtimeName
(
string $name
,
int $timestamp
[,
int $flags
] ) :
bool
statIndex
(
int $index
[,
int $flags
] ) :
array
statName
(
string $name
[,
int $flags
] ) :
array
}
Properties
- lastId
-
Index value of last added entry (file or directory).
Available as of PHP 8.0.0 and PECL zip 1.18.0.
- status
-
Status of the Zip Archive.
Available for closed archive, as of PHP 8.0.0 and PECL zip 1.18.0.
- statusSys
-
System status of the Zip Archive.
Available for closed archive, as of PHP 8.0.0 and PECL zip 1.18.0.
- numFiles
-
Number of files in archive
- filename
-
File name in the file system
-
Comment for the archive