예제 #1
0
 /**
  * Recursive function deleting a directory
  *
  * @param string $path The path of the directory to remove recursively
  * @param boolean $deleteParent If the path must be deleted too
  * @param array $except  filenames and suffix of filename, for files to NOT delete
  * @since 1.0b1
  * @author Loic Mathaud
  * @return boolean true if all the content has been removed
  */
 public static function removeDir($path, $deleteParent = true, $except = array())
 {
     if (is_array($except) && count($except)) {
         return Directory::removeExcept($path, $except, $deleteParent);
     } else {
         return Directory::remove($path, $deleteParent);
     }
 }
예제 #2
0
파일: Os.php 프로젝트: julieni/BuildTools
 public function removeDir($dir)
 {
     if (!file_exists($this->rootPath . $dir)) {
         //echo "cannot remove $dir. It doesn't exist.\n";
         return false;
     }
     \Jelix\FileUtilities\Directory::remove($this->rootPath . $dir);
     return true;
 }
예제 #3
0
 /**
  * Recursive function deleting a directory.
  *
  * @param string $path         The path of the directory to remove recursively
  * @param bool   $deleteParent If the path must be deleted too
  * @deprecated
  */
 public static function removeDir($path, $deleteParent = true)
 {
     return Directory::remove($path, $deleteParent);
 }