PharFileInfo->isCompressed

(no version information, might be only in CVS)

PharFileInfo->isCompressed -- Returns whether the entry is compressed

Description

bool PharFileInfo->isCompressed ( void )

This returns whether a file is compressed within a Phar archive with either Gzip or Bzip2 compression.

Return Values

TRUE if the file is compressed within the Phar archive, FALSE if not.

Examples

Example 1. A PharFileInfo->isCompressed() example

<?php
$p
= new Phar('my.phar');
$p['myfile.txt'] = 'hi';
$file = $p['myfile.txt'];
var_dump($file->isCompressed());
?>

The above example will output:

bool(false)

See Also

PharFileInfo->getCompressedSize()
PharFileInfo->isCompressedGZ()
PharFileInfo->isCompressedBZIP2()