src/Clients/FtpClient.php
protected function _findMode($fileName)
	{
		if ($this->type == FTP_AUTOASCII)
		{
			$dot = strrpos($fileName, '.') + 1;
			$ext = substr($fileName, $dot);

			if (\in_array($ext, $this->autoAscii))
			{
				$mode = FTP_ASCII;
			}
			else
			{
				$mode = FTP_BINARY;
			}
		}
		elseif ($this->type == FTP_ASCII)
		{
			$mode = FTP_ASCII;
		}
		else
		{
			$mode = FTP_BINARY;
		}

		return $mode;
	}
protected function _findMode($fileName)
	{
		if ($this->type == FTP_AUTOASCII)
		{
			$dot = strrpos($fileName, '.') + 1;
			$ext = substr($fileName, $dot);

			if (\in_array($ext, $this->autoAscii))
			{
				$mode = FTP_ASCII;
			}
			else
			{
				$mode = FTP_BINARY;
			}
		}
		elseif ($this->type == FTP_ASCII)
		{
			$mode = FTP_ASCII;
		}
		else
		{
			$mode = FTP_BINARY;
		}

		return $mode;
	}
protected function _findMode ( $ fileName ) { if ( $ this -> type == FTP_AUTOASCII ) { $ dot = strrpos ( $ fileName , '.' ) + 1 ; $ ext = substr ( $ fileName , $ dot ) ; if ( \ in_array ( $ ext , $ this -> autoAscii ) ) { $ mode = FTP_ASCII ; } else { $ mode = FTP_BINARY ; } } elseif ( $ this -> type == FTP_ASCII ) { $ mode = FTP_ASCII ; } else { $ mode = FTP_BINARY ; } return $ mode ; }
Method to find out the correct transfer mode for a specific file

@param   string  $fileName  Name of the file

@return  integer Transfer-mode for this filetype [FTP_ASCII|FTP_BINARY]

@since   1.0
Method to find out the correct transfer mode for a specific file