public function rename(string $newName) : bool
    {
        $renamed = rename($this->realPath, $newName);

        if ($renamed) {
            $this->realPath = realpath($newName);
        }

        return $renamed;
    }
public function rename(string $newName) : bool
    {
        $renamed = rename($this->realPath, $newName);

        if ($renamed) {
            $this->realPath = realpath($newName);
        }

        return $renamed;
    }
public function rename ( string $ newName ) : bool { $ renamed = rename ( $ this -> realPath , $ newName ) ; if ( $ renamed ) { $ this -> realPath = realpath ( $ newName ) ; } return $ renamed ; }
Give the source a new name.

@param string $newName

@return bool
Give the source a new name .