/** * 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); } }
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; }
/** * 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); }