/**
  * (non-PHPdoc)
  * @see Tinebase_WebDav_Collection_AbstractContainerTree::getChildren()
  */
 public function getChildren()
 {
     list($client) = Addressbook_Convert_Contact_VCard_Factory::getUserAgent();
     if (count($this->_getPathParts()) === 2 && in_array($client, array(Addressbook_Convert_Contact_VCard_Factory::CLIENT_MACOSX))) {
         $children[] = $this->getChild(Addressbook_Frontend_CardDAV_AllContacts::NAME);
         return $children;
     }
     return parent::getChildren();
 }
 /**
  * (non-PHPdoc)
  * @see Tinebase_WebDav_Collection_AbstractContainerTree::getChildren()
  */
 public function getChildren()
 {
     $children = parent::getChildren();
     // do this only for caldav request
     if ($this->_useIdAsName && count($this->_getPathParts()) == 2 && Tinebase_Core::getUser()->hasRight('Tasks', Tinebase_Acl_Rights::RUN)) {
         $tfwdavct = new Tasks_Frontend_WebDAV('tasks/' . Tinebase_Helper::array_value(1, $this->_getPathParts()), $this->_useIdAsName);
         $children = array_merge($children, $tfwdavct->getChildren());
     }
     return $children;
 }
 /**
  * Creates a new subdirectory
  *
  * @param  string  $name  name of the new subdirectory
  * @throws Sabre\DAV\Exception\Forbidden
  * @return Tinebase_Model_Container
  */
 public function createDirectory($name)
 {
     $container = parent::createDirectory($name);
     $path = '/' . $this->_getApplication()->getId() . '/folders/' . $container->type . '/';
     if ($container->type == Tinebase_Model_Container::TYPE_PERSONAL) {
         $path .= Tinebase_Core::getUser()->accountId . '/';
     }
     $path .= $container->getId();
     if (Tinebase_Core::isLogLevel(Zend_Log::DEBUG)) {
         Tinebase_Core::getLogger()->debug(__METHOD__ . '::' . __LINE__ . ' create directory: ' . $path);
     }
     Tinebase_FileSystem::getInstance()->mkdir($path);
 }