(PECL rar >= 2.0.0)
Check whether the RAR archive is solid
public bool RarArchive::isSolid ( void )
Object oriented style (method):
Procedural style:
Check whether the RAR archive is solid. Individual file extraction is slower on solid archives.
Parameters:
rarfile
A RarArchive object, opened with rar_open().
Returns:
Returns TRUE
if the archive is solid, FALSE
otherwise.
Examples:
Object oriented style
1 2 3 4 5 6 | <?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" ; ?> |
The above example will output something similar to:
RAR Archive "C:\php_rar\trunk\tests\store_method.rar": no RAR Archive "C:\php_rar\trunk\tests\solid.rar": yes
Procedural style
1 2 3 4 5 6 | <?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" ; ?> |
Please login to continue.