/**
* Set transfer mode
*
* @param integer $mode Integer representation of data transfer mode [1:Binary|0:Ascii]
* Defined constants can also be used [FTP_BINARY|FTP_ASCII]
*
* @return boolean True if successful
*
* @since 1.5
*/
protected function _mode($mode)
{
if ($mode == FTP_BINARY) {
if (!$this->_putCmd('TYPE I', 200)) {
Log::add(Text::sprintf('JLIB_CLIENT_ERROR_FTP_MODE_BINARY', __METHOD__, $this->_response), Log::WARNING, 'jerror');
return false;
}
} else {
if (!$this->_putCmd('TYPE A', 200)) {
Log::add(Text::sprintf('JLIB_CLIENT_ERROR_FTP_MODE_ASCII', __METHOD__, $this->_response), Log::WARNING, 'jerror');
return false;
}
}
return true;
}