API15

JFTP/restart

From Joomla! Documentation

< API15:JFTP

The "API15" namespace is an archived namespace. This page contains information for a Joomla! version which is no longer supported. It exists only as a historical reference, it will not be improved and its content may be incomplete and/or contain broken links.

Description[edit]

Method to restart data transfer at a given byte

[<! removed edit link to red link >]

<! removed transcluded page call, red link never existed >

Syntax[edit]

restart($point)
Parameter Name Default Value Description
$point $point Byte to restart transfer at

Returns[edit]

boolean True if successful

Defined in[edit]

libraries/joomla/client/ftp.php

Importing[edit]

jimport( 'joomla.client.ftp' );

Source Body[edit]

function restart($point) {

        // If native FTP support is enabled lets use it...
        if (FTP_NATIVE) {
                if (@ftp_site($this->_conn, 'REST '.$point) === false) {
                        JError::raiseWarning('35', 'JFTP::restart: Bad response' );
                        return false;
                }
                return true;
        }

        // Send restart command and verify success
        if (!$this->_putCmd('REST '.$point, 350)) {
                JError::raiseWarning('35', 'JFTP::restart: Bad response', 'Server response: '.$this->_response.' [Expected: 350] Restart point sent: '.$point );
                return false;
        }

        return true;
}

[<! removed edit link to red link >] <! removed transcluded page call, red link never existed >

Examples[edit]

Code Examples[edit]