mirror of
https://github.com/php-win-ext/php-rar.git
synced 2026-04-23 20:38:05 +02:00
7da530c6e3
Introduction of RarException. Added rar_solid_get RarEntry and RarArchive cannot be instantiated in user space. Quite some refactoring. git-svn-id: http://svn.php.net/repository/pecl/rar/trunk@292412 c90b9560-bf6c-de11-be94-00142212c4b1
41 lines
792 B
PHP
41 lines
792 B
PHP
--TEST--
|
|
RarEntry::extract() with directory
|
|
--SKIPIF--
|
|
<?php if(!extension_loaded("rar")) print "skip"; ?>
|
|
--FILE--
|
|
<?php
|
|
$rar_file1 = rar_open(dirname(__FILE__).'/directories.rar');
|
|
$e = rar_entry_get($rar_file1, "emptydir");
|
|
|
|
$dir = dirname(__FILE__) . DIRECTORY_SEPARATOR . "emptydir";
|
|
$exists = is_dir($dir);
|
|
var_dump($exists);
|
|
$extrres = $e->extract(dirname(__FILE__));
|
|
var_dump($extrres);
|
|
$exists = is_dir($dir);
|
|
var_dump($exists);
|
|
@rmdir($dir);
|
|
|
|
echo "\n\n";
|
|
|
|
$dir = dirname(__FILE__) . DIRECTORY_SEPARATOR . "emptydircust";
|
|
$exists = is_dir($dir);
|
|
var_dump($exists);
|
|
$extrres = $e->extract(false, $dir);
|
|
var_dump($extrres);
|
|
$exists = is_dir($dir);
|
|
var_dump($exists);
|
|
@rmdir($dir);
|
|
|
|
echo "Done\n";
|
|
--EXPECTF--
|
|
bool(false)
|
|
bool(true)
|
|
bool(true)
|
|
|
|
|
|
bool(false)
|
|
bool(true)
|
|
bool(true)
|
|
Done
|