File
in package
Table of Contents
Constants
- BIT_EFS_UTF8 = 0x800
- BIT_ZERO_HEADER = 0x8
- COMPUTE = 1
- HASH_ALGORITHM = 'crc32b'
- SEND = 2
- CHUNKED_READ_BLOCK_SIZE = 1048576
Properties
- $bits : int
- $crc : int
- $hlen : Bigint
- $len : Bigint
- $name : string
- $ofs : Bigint
- $opt : File
- $version : Version
- $zip : ZipStream
- $zlen : Bigint
- $deflate : resource
- $hash : HashContext
- $method : Method
- $totalLength : Bigint
Methods
- __construct() : mixed
- addFileFooter() : void
- Create and send data descriptor footer for this file.
- addFileHeader() : void
- Create and send zip header for this file.
- filterFilename() : string
- Strip characters that are not legal in Windows filenames to prevent compatibility issues
- getCdrFile() : string
- Send CDR record for specified file.
- getTotalLength() : Bigint
- processData() : void
- processPath() : void
- processStream() : void
- buildZip64ExtraBlock() : string
- deflateData() : void
- deflateFinish() : void
- deflateInit() : void
- dosTime() : int
- Convert a UNIX timestamp to a DOS timestamp.
- processStreamWithComputedHeader() : void
- processStreamWithZeroHeader() : void
- readStream() : void
Constants
BIT_EFS_UTF8
public
mixed
BIT_EFS_UTF8
= 0x800
BIT_ZERO_HEADER
public
mixed
BIT_ZERO_HEADER
= 0x8
COMPUTE
public
mixed
COMPUTE
= 1
HASH_ALGORITHM
public
mixed
HASH_ALGORITHM
= 'crc32b'
SEND
public
mixed
SEND
= 2
CHUNKED_READ_BLOCK_SIZE
private
mixed
CHUNKED_READ_BLOCK_SIZE
= 1048576
Properties
$bits
public
int
$bits
$crc
public
int
$crc
$hlen
public
Bigint
$hlen
$len
public
Bigint
$len
$name
public
string
$name
$ofs
public
Bigint
$ofs
$opt
public
File
$opt
$version
public
Version
$version
$zip
public
ZipStream
$zip
$zlen
public
Bigint
$zlen
$deflate
private
resource
$deflate
$hash
private
HashContext
$hash
$method
private
Method
$method
$totalLength
private
Bigint
$totalLength
Methods
__construct()
public
__construct(ZipStream $zip, string $name[, File|null $opt = null ]) : mixed
Parameters
addFileFooter()
Create and send data descriptor footer for this file.
public
addFileFooter() : void
addFileHeader()
Create and send zip header for this file.
public
addFileHeader() : void
Tags
filterFilename()
Strip characters that are not legal in Windows filenames to prevent compatibility issues
public
static filterFilename(string $filename) : string
Parameters
- $filename : string
-
Unprocessed filename
Return values
stringgetCdrFile()
Send CDR record for specified file.
public
getCdrFile() : string
Return values
stringgetTotalLength()
public
getTotalLength() : Bigint
Return values
BigintprocessData()
public
processData(string $data) : void
Parameters
- $data : string
processPath()
public
processPath(string $path) : void
Parameters
- $path : string
processStream()
public
processStream(StreamInterface $stream) : void
Parameters
- $stream : StreamInterface
buildZip64ExtraBlock()
protected
buildZip64ExtraBlock([bool $force = false ]) : string
Parameters
- $force : bool = false
Return values
stringdeflateData()
protected
deflateData(StreamInterface $stream, string &$data[, int|null $options = null ]) : void
Parameters
- $stream : StreamInterface
- $data : string
- $options : int|null = null
deflateFinish()
protected
deflateFinish([int|null $options = null ]) : void
Parameters
- $options : int|null = null
deflateInit()
protected
deflateInit() : void
dosTime()
Convert a UNIX timestamp to a DOS timestamp.
protected
final static dosTime(int $when) : int
Parameters
- $when : int
Return values
int —DOS Timestamp
processStreamWithComputedHeader()
protected
processStreamWithComputedHeader(StreamInterface $stream) : void
Parameters
- $stream : StreamInterface
processStreamWithZeroHeader()
protected
processStreamWithZeroHeader(StreamInterface $stream) : void
Parameters
- $stream : StreamInterface
readStream()
protected
readStream(StreamInterface $stream[, int|null $options = null ]) : void
Parameters
- $stream : StreamInterface
- $options : int|null = null