array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'ja', ), 'this' => array ( 0 => 'rararchive.issolid.php', 1 => 'RarArchive::isSolid', ), 'up' => array ( 0 => 'class.rararchive.php', 1 => 'RarArchive', ), 'prev' => array ( 0 => 'rararchive.isbroken.php', 1 => 'RarArchive::isBroken', ), 'next' => array ( 0 => 'rararchive.open.php', 1 => 'RarArchive::open', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'ja', 'path' => 'reference/rar/rararchive/issolid.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PECL rar >= 2.0.0)
RarArchive::isSolid -- rar_solid_is — RAR アーカイブがソリッドであるかどうかを調べる
オブジェクト指向型 (メソッド)
手続き型:
RAR アーカイブがソリッドであるかどうかを調べます。ソリッドなアーカイブでは、 個々のファイルの抽出速度が遅くなります。
例1 オブジェクト指向型
<?php
$arch1 = RarArchive::open("store_method.rar");
$arch2 = RarArchive::open("solid.rar");
echo "$arch1: " . ($arch1->isSolid()?'yes':'no') ."\n";
echo "$arch2: " . ($arch2->isSolid()?'yes':'no') . "\n";
?>
上の例の出力は、 たとえば以下のようになります。
RAR Archive "C:\php_rar\trunk\tests\store_method.rar": no RAR Archive "C:\php_rar\trunk\tests\solid.rar": yes
例2 手続き型
<?php
$arch1 = rar_open("store_method.rar");
$arch2 = rar_open("solid.rar");
echo "$arch1: " . (rar_solid_is($arch1)?'yes':'no') ."\n";
echo "$arch2: " . (rar_solid_is($arch2)?'yes':'no') . "\n";
?>