static function flush() { $root = c::get('root.cache'); if (!is_dir($root)) { return $root; } dir::clean($root); }
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); }
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(''); }
protected function removeAccounts() { dir::clean($this->roots->dummy . DS . 'site' . DS . 'accounts'); }
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')); }
static function killCache() { return dir::clean(c::get('root.cache')); }
/** * Flush the entire cache directory * * @return boolean */ public function flush() { return dir::clean($this->options['root']); }