ftp_pure::_data_read() –

You appear to be a bot. Output may be restricted

Description

Usage

ftp_pure::_data_read( $mode, $fp );

Parameters

$mode
( mixed ) optional default: FTP_ASCII –
$fp
( mixed ) optional

Returns

void

Source

File name: wordpress/wp-admin/includes/class-ftp-pure.php
Lines:

1 to 15 of 15
  function _data_read($mode=FTP_ASCII, $fp=NULL) {
    if(is_resource($fp)) $out=0;
    else $out="";
    if(!$this->_passive) {
      $this->SendMSG("Only passive connections available!");
      return FALSE;
    }
    while (!feof($this->_ftp_data_sock)) {
      $block=fread($this->_ftp_data_sock, $this->_ftp_buff_size);
      if($mode!=FTP_BINARY) $block=preg_replace("/\r\n|\r|\n/", $this->_eol_code[$this->OS_local], $block);
      if(is_resource($fp)) $out+=fwrite($fp, $block, strlen($block));
      else $out.=$block;
    }
    return $out;
  }
 

 View on GitHub View on Trac