PHP Class PHPZip\Zip\Core\ZipUtils

Show file Open project: Grandt/PHPZip Class Usage Examples

Public Methods

Method Description
clrBit ( &$data, $bit )
generateExtAttr ( integer $owner = 7, integer $group = 5, integer $other = 5, boolean $isFile = true ) : string Create the file permissions for a file or directory, for use in the extFileAttr parameters.
getDosTime ( integer $timestamp ) : string Calculate the 2 byte dos time used in the zip entries.
getFileExtAttr ( string $filename ) : string | boolean Get the file permissions for a file or directory, for use in the extFileAttr parameters.
setBit ( &$data, $bit, $value = true )
testBit ( $data, $bit )

Method Details

clrBit() public static method

public static clrBit ( &$data, $bit )

generateExtAttr() public static method

Create the file permissions for a file or directory, for use in the extFileAttr parameters.
Author: A. Grandt ([email protected])
public static generateExtAttr ( integer $owner = 7, integer $group = 5, integer $other = 5, boolean $isFile = true ) : string
$owner integer Unix permissions for owner (octal from 00 to 07)
$group integer Unix permissions for group (octal from 00 to 07)
$other integer Unix permissions for others (octal from 00 to 07)
$isFile boolean
return string EXTERNAL_REF field.

getDosTime() public static method

Calculate the 2 byte dos time used in the zip entries.
Author: A. Grandt ([email protected])
public static getDosTime ( integer $timestamp ) : string
$timestamp integer
return string 2-byte encoded DOS Date

getFileExtAttr() public static method

Get the file permissions for a file or directory, for use in the extFileAttr parameters.
Author: A. Grandt ([email protected])
public static getFileExtAttr ( string $filename ) : string | boolean
$filename string
return string | boolean external ref field, or false if the file is not found.

setBit() public static method

public static setBit ( &$data, $bit, $value = true )

testBit() public static method

public static testBit ( $data, $bit )