downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | conferences | my php.net

search for in the

PharFileInfo::getMetadata> <PharFileInfo::getCRC32
[edit] Last updated: Fri, 17 May 2013

view this page in

PharFileInfo::getCompressedSize

(PHP >= 5.3.0, PECL phar >= 1.0.0)

PharFileInfo::getCompressedSizeRetourne la taille actuelle (avec compression) du fichier au sein de l'archive Phar

Description

int PharFileInfo::getCompressedSize ( void )

Cette méthode retourne la taille du fichier au sein de l'archive Phar. Les fichiers non compressés retourneront la même valeur avec getCompressedSize qu'avec filesize()

Valeurs de retour

La taille en octets du fichier au sein de l'archive Phar sur le disque.

Exemples

Exemple #1 Un exemple avec PharFileInfo::getCompressedSize()

<?php
try {
    
$p = new Phar('/chemin/vers/mon.phar'0'mon.phar');
    
$p['monfichier.txt'] = 'salut';
    
$file $p['monfichier.txt'];
    echo 
$file->getCompressedSize();
} catch (
Exception $e) {
    echo 
'L'écriture de mon.phar a échoué ', $e;
}
?>

L'exemple ci-dessus va afficher :

2

Voir aussi



add a note add a note User Contributed Notes PharFileInfo::getCompressedSize - [0 notes]
There are no user contributed notes for this page.

 
show source | credits | stats | sitemap | contact | advertising | mirror sites