Actions

API16

JFTP/restart

From Joomla! Documentation

< API16:JFTP
Revision as of 17:39, 22 March 2010 by Doxiki (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Replacement filing cabinet.png
This Namespace has been archived - Please Do Not Edit or Create Pages in this namespace. Pages contain information for a Joomla! version which is no longer supported. It exists only as a historical reference, will not be improved and its content may be incomplete.

Contents

Description

Method to restart data transfer at a given byte

[Edit Descripton]

Description:JFTP/restart

Syntax

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

Returns

boolean True if successful

Defined in

libraries/joomla/client/ftp.php

Importing

jimport( 'joomla.client.ftp' );

Source Body

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;
}

[Edit See Also] SeeAlso:JFTP/restart

Examples

<CodeExamplesForm />