public function setPath($path)
{
if (null === $path) {
$this->path = null;
return $this;
}
if (false === strpos($path, '://') && 0 !== strpos($path, '/')) {
$path = GeneralUtility::getFileAbsFileName($path);
}
if (null === $this->type) {
$this->setType(pathinfo($path, PATHINFO_EXTENSION));
}
if (null === $this->name) {
$this->setName(pathinfo($path, PATHINFO_FILENAME));
}
$this->path = $path;
return $this;
}