当前位置: 首页>>代码示例>>PHP>>正文


PHP sotf_Utils::erase方法代码示例

本文整理汇总了PHP中sotf_Utils::erase方法的典型用法代码示例。如果您正苦于以下问题:PHP sotf_Utils::erase方法的具体用法?PHP sotf_Utils::erase怎么用?PHP sotf_Utils::erase使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在sotf_Utils的用法示例。


在下文中一共展示了sotf_Utils::erase方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: delete

 function delete()
 {
     if (!$this->isLocal()) {
         raiseError("Can delete only local stations");
     }
     // delete files from the repository
     debug("deleting: ", $this->getDir());
     sotf_Utils::erase($this->getDir());
     // delete from sql db
     return parent::delete();
 }
开发者ID:BackupTheBerlios,项目名称:sotf-svn,代码行数:11,代码来源:sotf_Station.class.php

示例2: delete

 function delete()
 {
     global $db;
     if ($this->isLocal()) {
         // delete files from the repository
         debug("deleting: ", $this->getDir());
         sotf_Utils::erase($this->getDir());
         // delete from sql db
         // somehow foreign keys do not work in this case, so let's do it by hand:
         $db->query("DELETE FROM sotf_object_roles WHERE object_id='" . $this->id . "'");
     }
     return parent::delete();
 }
开发者ID:BackupTheBerlios,项目名称:sotf,代码行数:13,代码来源:sotf_ComplexNodeObject.class.php

示例3: erase

 /**
  * Deletes a file or directory, even if directory is not empty.
  *
  * @param	string	$file	File or directory to be deleted
  */
 function erase($file)
 {
     if (is_dir($file)) {
         $handle = opendir($file);
         while ($filename = readdir($handle)) {
             if ($filename != "." && $filename != "..") {
                 sotf_Utils::erase($file . "/" . $filename);
             }
         }
         closedir($handle);
         rmdir($file);
     } else {
         unlink($file);
     }
 }
开发者ID:BackupTheBerlios,项目名称:sotf-svn,代码行数:20,代码来源:sotf_Utils.class.php

示例4: delete

 /**
  * sotfShow::delete()
  *
  * purpose: to delete data from the tables
  *
  * @return (bool)
  */
 function delete()
 {
     if (!$this->isLocal()) {
         error("Can delete only local stations");
         return false;
     }
     // delete files from the repository
     sotf_Utils::erase($this->getDir());
     // delete programmes of the station
     // TODO getallprogrammes: call delete
     // delete user permissions
     $this->db->query("DELETE FROM sotf_user_group WHERE station = '" . $this->id . "'");
     // propagate deletion to other nodes
     $data = array('what' => 'station', 'del_time' => db_Wrap::getTimestampTZ(), 'node' => $GLOBALS['nodeId']);
     sotf_Base::saveDataWithId("sotf_deletions", 'id', $this->id, $data);
     // delete station description
     return parent::delete("sotf_stations", "station");
 }
开发者ID:BackupTheBerlios,项目名称:sotf-svn,代码行数:25,代码来源:sotf_Station.class.php

示例5: erase

 /**
  * Deletes a file or directory, even if directory is not empty.
  *
  * @param	string	$file	File or directory to be deleted
  */
 function erase($file)
 {
     if (is_dir($file)) {
         $handle = opendir($file);
         while ($filename = readdir($handle)) {
             if ($filename != "." && $filename != "..") {
                 sotf_Utils::erase($file . "/" . $filename);
             }
         }
         closedir($handle);
         if (!rmdir($file)) {
             logger("Could not delete dir", $file);
         }
     } else {
         if (!unlink($file)) {
             logger("Could not delete file", $file);
         }
     }
 }
开发者ID:BackupTheBerlios,项目名称:sotf-svn,代码行数:24,代码来源:sotf_Utils.class.php

示例6: realpath

            $phpDirFiles[] = realpath($file);
        }
    }
    closedir($dir);
}
if ($dir = opendir($config['classdir'])) {
    while (($file = readdir($dir)) !== false) {
        if (preg_match("/\\.class\\.php\$/", $file)) {
            $phpClassFiles[] = $config['classdir'] . "/{$file}";
        }
    }
    closedir($dir);
}
$script = realpath("{$phpdocgendir}/phpdocgen.pl");
if (is_dir($docdir)) {
    sotf_Utils::erase($docdir);
}
?>
<html>
<head>
<title>Documentation generation</title>
</head>
<body>
<p><b>Target dir</b>: <?php 
echo $docdir;
?>
</p>
<p><b>phpdocgen output</b>:</p>
<pre>
<?php 
passthru("{$perl} {$script} --output={$docdir} --defpack=StreamOnTheFly " . " " . implode(" ", $phpClassFiles) . " 2>&1");
开发者ID:BackupTheBerlios,项目名称:sotf-svn,代码行数:31,代码来源:docGen.php


注:本文中的sotf_Utils::erase方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。