Pimcore\Model\Asset\WebDAV\Folder::setName PHP Method

setName() public method

public setName ( string $name )
$name string
    public function setName($name)
    {
        if ($this->asset->isAllowed("rename")) {
            $this->asset->setFilename(Element\Service::getValidKey($name, "asset"));
            $this->asset->save();
        } else {
            throw new DAV\Exception\Forbidden();
        }
        return $this;
    }