本文整理汇总了PHP中FileSystem::removeFolder方法的典型用法代码示例。如果您正苦于以下问题:PHP FileSystem::removeFolder方法的具体用法?PHP FileSystem::removeFolder怎么用?PHP FileSystem::removeFolder使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FileSystem
的用法示例。
在下文中一共展示了FileSystem::removeFolder方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: removeClone
/**
* removes a cloned repo
*
*
*/
public function removeClone()
{
$dir = $this->Directory();
GeneralMethods::output_to_screen('Removing ' . $dir . ' and all its contents ... ', "created");
$this->gitRepo = null;
FileSystem::removeFolder($dir);
// removes contents but not the actual folder
//rmdir ($dir);
return !file_exists($dir);
}
示例2: onAfterDelete
/**
* Delete related environments and folders
*/
public function onAfterDelete()
{
parent::onAfterDelete();
// Delete related environments
foreach ($this->Environments() as $env) {
$env->delete();
}
if (!file_exists($this->getProjectFolderPath())) {
return;
}
// Create a basic new environment config from a template
if (Config::inst()->get('DNEnvironment', 'allow_web_editing')) {
FileSystem::removeFolder($this->getProjectFolderPath());
}
}
示例3: removeDirectory
public static function removeDirectory($path)
{
FileSystem::removeFolder($path);
}