/**
  * start afresh; remove tmp dir
  *
  * @return void
  */
 public function tearDown()
 {
     parent::tearDown();
     unset($this->em);
     if ($this->tmpDir) {
         FileSystemManager::rrmdir($this->tmpDir);
     }
 }
 /**
  * main method
  *
  * @return void
  */
 public function main()
 {
     if (!$this->dir) {
         throw new BuildException('dir must be set');
     }
     FileSystemManager::rrmdir($this->dir);
     $this->log(sprintf('Recursively deleted the directory \'%s\'', $this->dir));
 }
Beispiel #3
0
 /**
  * install: cleanup
  *
  * - remove source files and dir, except updates
  *
  * @return self
  */
 public function installCleanup()
 {
     foreach (new \FilesystemIterator($this->getTmpDir()) as $dir) {
         if (!is_dir($dir)) {
             unlink($dir);
         } else {
             if (basename($dir) != 'update') {
                 FileSystemManager::rrmdir($dir);
             }
         }
     }
     return $this;
 }