clean() 정적인 공개 메소드

Flushes a directory
static public clean ( string $dir ) : boolean
$dir string The path of the directory
리턴 boolean True: the directory has been flushed, false: flushing failed
예제 #1
0
 static function flush()
 {
     $root = c::get('root.cache');
     if (!is_dir($root)) {
         return $root;
     }
     dir::clean($root);
 }
예제 #2
0
 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
0
파일: Thumbs.php 프로젝트: getkirby/cli
 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
0
파일: testcase.php 프로젝트: nsteiner/kdoc
 protected function removeAccounts()
 {
     dir::clean($this->roots->dummy . DS . 'site' . DS . 'accounts');
 }
예제 #5
0
 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
0
 static function killCache()
 {
     return dir::clean(c::get('root.cache'));
 }
예제 #7
0
파일: file.php 프로젝트: LucasFyl/korakia
 /**
  * Flush the entire cache directory
  *
  * @return boolean
  */
 public function flush()
 {
     return dir::clean($this->options['root']);
 }