Moodle PHP Documentation 4.2
Moodle 4.2.8 (Build: 20240610) (2d41ac46f45)
ZipStream\File Class Reference

Public Member Functions

 __construct (ZipStream $zip, string $name, ?FileOptions $opt=null)
 
 addFileFooter ()
 Create and send data descriptor footer for this file.
 
 addFileHeader ()
 Create and send zip header for this file.
 
 getCdrFile ()
 Send CDR record for specified file.
 
 getTotalLength ()
 
 processData (string $data)
 
 processPath (string $path)
 
 processStream (StreamInterface $stream)
 

Static Public Member Functions

static filterFilename (string $filename)
 Strip characters that are not legal in Windows filenames to prevent compatibility issues.
 

Public Attributes

int $bits
 
int $crc
 
Bigint $hlen
 
Bigint $len
 
string $name
 
Bigint $ofs
 
FileOptions $opt
 
Version $version
 
ZipStream $zip
 
Bigint $zlen
 
const BIT_EFS_UTF8 = 0x0800
 
const BIT_ZERO_HEADER = 0x0008
 
const COMPUTE = 1
 
const HASH_ALGORITHM = 'crc32b'
 
const SEND = 2
 

Protected Member Functions

 buildZip64ExtraBlock (bool $force=false)
 
 deflateData (StreamInterface $stream, string &$data, ?int $options=null)
 
 deflateFinish (?int $options=null)
 
 deflateInit ()
 
 processStreamWithComputedHeader (StreamInterface $stream)
 
 processStreamWithZeroHeader (StreamInterface $stream)
 
 readStream (StreamInterface $stream, ?int $options=null)
 

Static Protected Member Functions

static dosTime (int $when)
 Convert a UNIX timestamp to a DOS timestamp.
 

Member Function Documentation

◆ addFileFooter()

ZipStream\File::addFileFooter ( )

Create and send data descriptor footer for this file.

Return values
void

◆ addFileHeader()

ZipStream\File::addFileHeader ( )

Create and send zip header for this file.

Return values
void
Exceptions
ZipStream\Exception\EncodingException

◆ dosTime()

static ZipStream\File::dosTime ( int $when)
staticfinalprotected

Convert a UNIX timestamp to a DOS timestamp.

Parameters
int$when
Return values
intDOS Timestamp

◆ filterFilename()

static ZipStream\File::filterFilename ( string $filename)
static

Strip characters that are not legal in Windows filenames to prevent compatibility issues.

Parameters
string$filenameUnprocessed filename
Return values
string

◆ getCdrFile()

ZipStream\File::getCdrFile ( )

Send CDR record for specified file.

Return values
string

◆ getTotalLength()

ZipStream\File::getTotalLength ( )
Return values
Bigint

The documentation for this class was generated from the following file: