logo       
Google Custom Search
    AddThis Social Bookmark Button

cvs: pear-core /tests/PEAR_PackageFile/v1 teardown.php.inc: msg#00035

Subject: cvs: pear-core /tests/PEAR_PackageFile/v1 teardown.php.inc
cellog          Fri Feb  3 04:26:16 2006 UTC

  Added files:                 
    /pear-core/tests/PEAR_PackageFile/v1        teardown.php.inc 
  Log:
  switch to using --CLEAN-- instead of register_shutdown_func
  

http://cvs.php.net/viewcvs.cgi/pear-core/tests/PEAR_PackageFile/v1/teardown.php.inc?view=markup&rev=1.1
Index: pear-core/tests/PEAR_PackageFile/v1/teardown.php.inc
+++ pear-core/tests/PEAR_PackageFile/v1/teardown.php.inc
<?php

$server = 'pear.Chiara';
//$server = 'test.pear.php.net';
$temp_path = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'testinstallertemp';
function cleanall($dir = null)
{
    if ($dir !== null) {
        $statedir = $dir;
    } else {
        $statedir = $GLOBALS['statedir'];
    }
    clearstatcache();
    if (file_exists($statedir)) {
        $dp = opendir($statedir);
        while ($ent = readdir($dp)) {
            if (in_array($ent, array('.', '..'))) {
                continue;
            }
            if (is_dir($statedir . DIRECTORY_SEPARATOR . $ent)) {
                cleanall($statedir . DIRECTORY_SEPARATOR . $ent);
                continue;
            }
            unlink($statedir . DIRECTORY_SEPARATOR . $ent);
        }
        closedir($dp);
        rmdir($statedir);
    }
}
cleanall($temp_path);
?>

-- 
PEAR CVS Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





Try Searching:
servers, voip, java, networking, microsoft ...
<Prev in Thread] Current Thread [Next in Thread>