コード例 #1
0
ファイル: Temp.php プロジェクト: schpill/thin
 /**
  * Destructor
  *
  * Delete all files created by syrup component run
  */
 function __destruct()
 {
     $preserveRunFolder = $this->preserveRunFolder;
     $fs = new Filesystem();
     foreach ($this->files as $file) {
         if ($file['preserve']) {
             $preserveRunFolder = true;
         }
         if (File::exists($file['file']) && File::is($file['file']) && true !== $file['preserve']) {
             $fs->remove($file['file']);
         }
     }
     if (false === $preserveRunFolder) {
         $fs->remove($this->tmpRunFolder);
     }
 }