本文整理汇总了PHP中dir::clean方法的典型用法代码示例。如果您正苦于以下问题:PHP dir::clean方法的具体用法?PHP dir::clean怎么用?PHP dir::clean使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类dir
的用法示例。
在下文中一共展示了dir::clean方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: flush
static function flush()
{
$root = c::get('root.cache');
if (!is_dir($root)) {
return $root;
}
dir::clean($root);
}
示例2: testClean
public function testClean()
{
dir::make($this->tmpDir);
f::write($this->tmpDir . DS . 'testfile.txt', '');
$this->assertTrue(dir::clean($this->tmpDir));
$files = dir::read($this->tmpDir);
$this->assertEquals(0, count($files));
dir::remove($this->tmpDir);
}
示例3: execute
protected function execute(InputInterface $input, OutputInterface $output)
{
if ($this->isInstalled() === false) {
throw new RuntimeException('Invalid Kirby installation');
}
// get the thumbs folder and bootstrap kirby
$thumbs = $this->kirby()->roots()->thumbs();
// flush the thumbs folder
dir::clean($thumbs);
$output->writeln('<comment>The thumbs folder has been emptied</comment>');
$output->writeln('');
}
示例4: removeAccounts
protected function removeAccounts()
{
dir::clean($this->roots->dummy . DS . 'site' . DS . 'accounts');
}
示例5: killCache
static function killCache()
{
if (c::get('cache.autoupdate')) {
return false;
}
if (!is_dir(c::get('root.cache'))) {
return false;
}
return dir::clean(c::get('root.cache'));
}
示例6: killCache
static function killCache()
{
return dir::clean(c::get('root.cache'));
}
示例7: flush
/**
* Flush the entire cache directory
*
* @return boolean
*/
public function flush()
{
return dir::clean($this->options['root']);
}