本文整理匯總了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']);
}