WordPress at Your Fingertips
function is not described

ftp_base::fget() public WP 1.0

{} It's a method of the class: ftp_base{}

No Hooks.

Return

null. Nothing.

Usage

$ftp_base = new ftp_base();
$ftp_base->fget( $fp, $remotefile, $rest );
$fp (required)
-
$remotefile (required)
-
$rest **
-

Code of ftp_base::fget() WP 5.8.2

function fget($fp, $remotefile, $rest=0) {
	if($this->_can_restore and $rest!=0) fseek($fp, $rest);
	$pi=pathinfo($remotefile);
	if($this->_type==FTP_ASCII or ($this->_type==FTP_AUTOASCII and in_array(strtoupper($pi["extension"]), $this->AutoAsciiExt))) $mode=FTP_ASCII;
	else $mode=FTP_BINARY;
	if(!$this->_data_prepare($mode)) {
		return FALSE;
	}
	if($this->_can_restore and $rest!=0) $this->restore($rest);
	if(!$this->_exec("RETR ".$remotefile, "get")) {
		$this->_data_close();
		return FALSE;
	}
	if(!$this->_checkCode()) {
		$this->_data_close();
		return FALSE;
	}
	$out=$this->_data_read($mode, $fp);
	$this->_data_close();
	if(!$this->_readmsg()) return FALSE;
	if(!$this->_checkCode()) return FALSE;
	return $out;
}