public function getSize(string $remoteFile)
    {
        $size = @ftp_size($this->ftp, $remoteFile);

        if ($size == -1) {
            throw new Exception("Cannot get file size");
        }

        return $size;
    }
public function getSize(string $remoteFile)
    {
        $size = @ftp_size($this->ftp, $remoteFile);

        if ($size == -1) {
            throw new Exception("Cannot get file size");
        }

        return $size;
    }
public function getSize ( string $ remoteFile ) { $ size = @ ftp_size ( $ this -> ftp , $ remoteFile ) ; if ( $ size == - 1 ) { throw new Exception ( "Cannot get file size" ) ; } return $ size ; }
Get size of file on ftp-server.

@param string $remoteFile Remote file path.

@return int File size in byte.
@throws Exception
Get size of file on ftp - server .