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.

Valeurs de retour

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

Exemples

Exemple 1. A PharFileInfo->isCompressed() example

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

L'exemple ci-dessus va afficher :

bool(false)

Voir aussi

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