ftp_pure::_data_write()publicWP 1.0

Method of the class: ftp_pure{}

No Hooks.

Return

null. Nothing (null).

Usage

$ftp_pure = new ftp_pure();
$ftp_pure->_data_write( $mode, $fp );
$mode **
-
Default: FTP_ASCII
$fp **
-
Default: NULL

ftp_pure::_data_write() code WP 6.5.2

function _data_write($mode=FTP_ASCII, $fp=NULL) {
	if(is_resource($fp)) $out=0;
	else $out="";
	if(!$this->_passive) {
		$this->SendMSG("Only passive connections available!");
		return FALSE;
	}
	if(is_resource($fp)) {
		while(!feof($fp)) {
			$block=fread($fp, $this->_ftp_buff_size);
			if(!$this->_data_write_block($mode, $block)) return false;
		}
	} elseif(!$this->_data_write_block($mode, $fp)) return false;
	return TRUE;
}