public function setExtension(string $extension)
    {
        $old = $this->getPath();
        $new = $this->getLocation().DIRECTORY_SEPARATOR.$this->getName();

        if(!empty($extension)) {
            $new .= ".{$extension}";
        }

        if(rename($old, $new)) {
            $this->_extension = $extension;
        }
    }