kirby/vendor/getkirby/toolkit/lib/folder.php
/**
   * Deletes the directory
   * 
   * @param boolean $keep Set this to true to keep the directory but delete all its content
   * @return boolean
   */
Deletes the directory

@param boolean $keep Set this to true to keep the directory but delete all its content
@return boolean
Deletes the directory @param boolean $keep Set this to true to keep the directory but delete all its content @return boolean
public function delete($keep = false) {
    $items = $this->content(array('.', '..'));      
    foreach($items as $item) $item->delete();
    return $keep ? true : @rmdir($this->root);
  }
public function delete ( $ keep = false ) { $ items = $ this -> content ( array ( '.' , '..' ) ) ; foreach ( $ items as $ item ) $ item -> delete ( ) ; return $ keep ? true : @ rmdir ( $ this -> root ) ; }
Deletes the directory
Deletes the directory