getChildren() as $child) { if ($child->getName()==$name) return $child; } throw new Sabre_DAV_Exception_FileNotFound('File not found: ' . $name); } /** * Checks is a child-node exists. * * It is generally a good idea to try and override this. Usually it can be optimized. * * @param string $name * @return bool */ public function childExists($name) { try { $this->getChild($name); return true; } catch(Sabre_DAV_Exception_FileNotFound $e) { return false; } } /** * Creates a new file in the directory * * @param string $name Name of the file * @param resource $data Initial payload, passed as a readable stream resource. * @throws Sabre_DAV_Exception_Forbidden * @return void */ public function createFile($name, $data = null) { throw new Sabre_DAV_Exception_Forbidden('Permission denied to create file (filename ' . $name . ')'); } /** * Creates a new subdirectory * * @param string $name * @throws Sabre_DAV_Exception_Forbidden * @return void */ public function createDirectory($name) { throw new Sabre_DAV_Exception_Forbidden('Permission denied to create directory'); } }