Changeset View
Changeset View
Standalone View
Standalone View
lib/Kolab/DAV/Collection.php
Show First 20 Lines • Show All 207 Lines • ▼ Show 20 Lines | class Collection extends Node implements \Sabre\DAV\ICollection | ||||
*/ | */ | ||||
public function createDirectory($name) | public function createDirectory($name) | ||||
{ | { | ||||
// no support for hidden system files | // no support for hidden system files | ||||
if ($name[0] == '.') { | if ($name[0] == '.') { | ||||
throw new \Sabre\DAV\Exception\Forbidden('Hidden files are not accepted'); | throw new \Sabre\DAV\Exception\Forbidden('Hidden files are not accepted'); | ||||
} | } | ||||
$folder = $this->path . '/' . $name; | $folder = (strlen($this->path) ? $this->path . '/' : '') . $name; | ||||
try { | try { | ||||
$this->backend->folder_create($folder); | $this->backend->folder_create($folder); | ||||
} | } | ||||
catch (Exception $e) { | catch (Exception $e) { | ||||
$this->throw_exception($e); | $this->throw_exception($e); | ||||
} | } | ||||
// reset cache | // reset cache | ||||
$this->children = null; | $this->children = null; | ||||
} | } | ||||
} | } |