/** * Creates a new subdirectory * * @param string $name * @throws Sabre_DAV_Exception_Forbidden * @return void */ public function createDirectory($name) { Filemanager_Frontend_WebDAV_Node::checkForbiddenFile($name); if (!Tinebase_Core::getUser()->hasGrant($this->_getContainer(), Tinebase_Model_Grants::GRANT_ADD)) { throw new Sabre_DAV_Exception_Forbidden('Forbidden to create folder: ' . $name); } $path = $this->_path . '/' . $name; if (Tinebase_Core::isLogLevel(Zend_Log::DEBUG)) { Tinebase_Core::getLogger()->debug(__METHOD__ . '::' . __LINE__ . ' create directory: ' . $path); } Tinebase_FileSystem::getInstance()->mkdir($path); }
/** * Renames the node * * @throws Sabre_DAV_Exception_Forbidden * @param string $name The new name * @return void */ public function setName($name) { Filemanager_Frontend_WebDAV_Node::checkForbiddenFile($name); if (!Tinebase_Core::getUser()->hasGrant($this->_getContainer(), Tinebase_Model_Grants::GRANT_EDIT)) { throw new Sabre_DAV_Exception_Forbidden('Forbidden to rename file: ' . $this->_path); } $this->_getContainer()->name = $name; Tinebase_Container::getInstance()->update($this->_getContainer()); }