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

search for in the

PharFileInfo::getMetadata> <PharFileInfo::getCRC32
[edit] Last updated: Fri, 25 May 2012

view this page in

PharFileInfo::getCompressedSize

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

PharFileInfo::getCompressedSizePhar アーカイブ内での実際のファイルの大きさ (圧縮された状態) を返す

説明

int PharFileInfo::getCompressedSize ( void )

この関数は、Phar アーカイブ内でのファイルの大きさを返します。 圧縮されていないファイルの場合は、getCompressedSize は filesize() と同じ値を返します。

返り値

ディスク上の Phar アーカイブ内のファイルのバイト数を返します。

例1 PharFileInfo::getCompressedSize() の例

<?php
try {
    
$p = new Phar('/path/to/my.phar'0'my.phar');
    
$p['myfile.txt'] = 'hi';
    
$file $p['myfile.txt'];
    echo 
$file->getCompressedSize();
} catch (
Exception $e) {
    echo 
'my.phar での書き込み操作に失敗しました: '$e;
}
?>

上の例の出力は以下となります。

2

参考



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

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