Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Renames a file or a directory on the FTP server
<?php ftp_rename(FTP\Connection $ftp, string $from, string $to): bool
<?php         $destinationLocation = $this->prefixer->prefixPath($destination);

        $connection = $this->connection();



        if ( ! @ftp_rename($connection, $sourceLocation, $destinationLocation)) {

            throw UnableToMoveFile::fromLocationTo($source, $destination);

        }

    }