public function mkdir($dst, $name)
{
if ($this->commandDisabled('mkdir')) {
return $this->setError(elFinder::ERROR_PERM_DENIED);
}
if (!$this->nameAccepted($name)) {
return $this->setError(elFinder::ERROR_INVALID_NAME);
}
if (($dir = $this->dir($dst)) == false) {
return $this->setError(elFinder::ERROR_TRGDIR_NOT_FOUND, '#' . $dst);
}
if (!$dir['write']) {
return $this->setError(elFinder::ERROR_PERM_DENIED);
}
$path = $this->decode($dst);
$dst = $this->_joinPath($path, $name);
$stat = $this->stat($dst);
if (!empty($stat)) {
return $this->setError(elFinder::ERROR_EXISTS, $name);
}
$this->clearcache();
return ($path = $this->_mkdir($path, $name)) ? $this->stat($path) : false;
}