/** * Delete the current file * * @return bool */ public function delete() { unlink($this->path); return parent::delete(); }
/** * Deletes all files in this directory, and then itself * * @return bool */ public function delete() { // Deleting all children foreach ($this->getChildren() as $child) { $child->delete(); } // Removing resource info, if its still around if (file_exists($this->path . '/.sabredav')) { unlink($this->path . '/.sabredav'); } // Removing the directory itself rmdir($this->path); return parent::delete(); }