Ejemplo n.º 1
0
 /**
  * Checks if directory is empty then deletes it,
  * three levels up to match the partition directory.
  */
 private function deleteEmptyDirectory($dir = null)
 {
     if (!$this->isDirectoryEmpty($dir)) {
         return;
     }
     FileHelper::deleteDirectory($dir);
     $dir = dirname($dir);
     if (!$this->isDirectoryEmpty($dir)) {
         return;
     }
     FileHelper::deleteDirectory($dir);
     $dir = dirname($dir);
     if (!$this->isDirectoryEmpty($dir)) {
         return;
     }
     FileHelper::deleteDirectory($dir);
 }