ZipFile
in package
Zip file helpers
Table of Contents
Methods
- create() : bool
- Create zip arhive
- extract() : bool
- Extract zip arhive
- getItemPath() : string|null
- Get zip file item name
- getZipError() : string|null
- Get zip error
- isValid() : bool
- Check if zip arhive is valid
Methods
create()
Create zip arhive
public
static create(string $source, string $destination[, array<string|int, mixed> $skipDir = [] ]) : bool
Parameters
- $source : string
- $destination : string
- $skipDir : array<string|int, mixed> = []
Return values
boolextract()
Extract zip arhive
public
static extract(string $file, string $destination[, array<string|int, mixed>|string|int|null $files = null ]) : bool
Parameters
- $file : string
- $destination : string
- $files : array<string|int, mixed>|string|int|null = null
Return values
boolgetItemPath()
Get zip file item name
public
static getItemPath(string $zipFile, int $index) : string|null
Parameters
- $zipFile : string
- $index : int
Return values
string|nullgetZipError()
Get zip error
public
static getZipError(mixed $resource) : string|null
Parameters
- $resource : mixed
Return values
string|nullisValid()
Check if zip arhive is valid
public
static isValid(string $file) : bool
Parameters
- $file : string