コード例 #1
0
ファイル: bootstrap.php プロジェクト: xuanyan/cache
function MyDelete($dir)
{
    if (!file_exists($dir)) {
        return false;
    }
    if (is_file($dir)) {
        return unlink($dir);
    }
    $path = new DirectoryIterator($dir);
    foreach ($path as $val) {
        if (!$val->isDot()) {
            MyDelete($val->getPathname());
        }
    }
    return rmdir($dir);
}
コード例 #2
0
ファイル: fileTest.php プロジェクト: xuanyan/cache
 public function tearDown()
 {
     $this->c = null;
     MyDelete(__DIR__ . '/tmp');
 }