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

search for in the

RarEntry::getVersion> <RarEntry::getStream
[edit] Last updated: Fri, 25 May 2012

view this page in

RarEntry::getUnpackedSize

(PECL rar >= 0.1)

RarEntry::getUnpackedSize展開後のエントリのサイズを取得する

説明

public int RarEntry::getUnpackedSize ( void )

展開後のアーカイブエントリのサイズを取得します。

注意:

調整数型が 32 ビットであるプラットフォーム (Windows x64 など) では、返されるサイズの上限は 2 GiB となります。定数 PHP_INT_MAX をチェックしましょう。

パラメータ

この関数にはパラメータはありません。

返り値

展開後のサイズ、あるいはエラー時に FALSE を返します。

変更履歴

バージョン 説明
2.0.0 このメソッドは、64 ビット整数型のプラットフォームで 2 GiB を超えるサイズを正しく返せるようになりました。 また、それ以外のプラットフォームでも負の値を返すことがなくなりました。

返り値

例1 RarEntry::getUnpackedSize() の例

<?php

$rar_file 
rar_open('example.rar') or die("Rar アーカイブのオープンに失敗しました");

$entry rar_entry_get($rar_file'Dir/file.txt') or die("そのようなエントリは見つかりません");

echo 
"展開後の " $entry->getName() . " のサイズ = " $entry->getUnpackedSize() . " バイト";

?>



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

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