Returns the canonical newline convention in use when reading/writing text
files.

@return String
@throws SftpStatusException
428563
public byte[] getCanonicalNewline() throws SftpStatusException {
		if (version <= 3) {
			throw new SftpStatusException(
					SftpStatusException.SSH_FX_OP_UNSUPPORTED,
					"Newline setting not available for SFTP versions <= 3");

		}

		if (!extensions.containsKey("newline"))
			return "\r\n".getBytes();

		return extensions.get("newline");
	}
1315252
public function toString()
    {
        $newLine = "\n";
        $string = $newLine . $newLine;

        $i = 0;
        foreach ($this->dns as $dns) {
            ++$i;
            $string .= 'DNS.' . $i . ' = ' . $dns .$newLine;
        }

        $i = 0;
        foreach ($this->ip as $ip) {
            ++$i;
            $string .= 'IP.' . $i . ' = ' . $ip .$newLine;
        }

        $i = 0;
        foreach ($this->url as $url) {
            ++$i;
            $string .= 'URL.' . $i . ' = ' . $url .$newLine;
        }

        return $string;
    }
283129
public function readLine(): string
	{
		$line = fgets($this->connection);

		if($line === false || $line === '')
		{
			throw new RedisException($this->appendReadErrorReason('Failed to read line from the server.'));
		}

		return $line;
	}
643866
private void newLine() {
    numBlocks = 0;
    perms = username = group = path = linkTarget = replication = hardlinkId = "";
    filesize = 0l;
    type = INode.INodeType.REGULAR_INODE.toString();
    inInode = true;
  }
329506
public function getLine()
    {
        $line = @stream_get_line($this->sock, 2048, "\n");
        if ($line === '' || $line === false) {
            $line = $this->ioEmptyError() ? false : null;
        } else {
            $line = rtrim($line, "\r");
        }
        $this->ioFlagReset();
        return $line;
    }
877197
public function getExt()
    {
        if (is_null($this->ext) && $this->originFile) {
            $file = basename($this->originFile);
            // Use substr instead of pathinfo, because pathinfo may return error value in unicode
            if (false !== $pos = strrpos($file, '.')) {
                $this->ext = strtolower(substr($file, $pos + 1));
            } else {
                $this->ext = '';
            }
        }
        return $this->ext;
    }
595403
public function getLineIndentation()
    {
        $first = $this->getFirstTokenOnLine();
        if ( ! $first->matches(T_WHITESPACE)) {
            return '';
        }

        return $first->getContentUntil($first->findNextToken('NO_WHITESPACE')->get());
    }
843895
public function readLine()
    {
        $line = null;
        while (($ch = $this->readChar()) !== -1) {
            if ($ch === "\n") {
                break;
            }
            $line .= $ch;
        }

        // Warning : Not considering an empty line as an EOF
        if ($line === null && $ch !== -1) {
            return "";
        }

        return $line;
    }
1103088
protected function scanNewline()
    {
        if ('' !== $this->getTrimmedLine()) {
            return null;
        }

        $token = $this->takeToken('Newline', mb_strlen($this->line, 'utf8'));
        $this->consumeLine();

        return $token;
    }
1231834
public function getFormat()
    {
        try {
            $fileObj = new SplFileObject($this->getName(true) , 'r');
        } catch ( RuntimeException $ex ) {
            throw new FileExistException('The provided file is not readable' , $ex);
        }

        return $fileObj->getExtension();
    }
609723
private function readLine(): string
    {
        $buffer = '';
        $size = 0;

        // \r\n is two chars which requires slightly different logic.
        // Check this outside of the while loop to save an if statement for each character.
        if ($this->eol !== "\r\n") {
            while (!$this->stream->eof()) {
                // Using a loose equality here to match on '' and false.
                if (null == ($byte = $this->stream->read(1))) {
                    return $buffer;
                }
                $buffer .= $byte;

                // Break when a new line is found or the max length - 1 is reached
                if ($byte === $this->eol || ++$size === $this->maxLineLength - 1) {
                    break;
                }
            }
        } else {
            $prevByte = null;
            while (!$this->stream->eof()) {
                // Using a loose equality here to match on '' and false.
                if (null == ($byte = $this->stream->read(1))) {
                    return $buffer;
                }
                $buffer .= $byte;

                // Break when a new line is found or the max length - 2 is reached
                if ($prevByte . $byte === $this->eol || ++$size === $this->maxLineLength - 2) {
                    break;
                }

                $prevByte = $byte;
            }
        }

        return $buffer;
    }
944660
public function getLineFormatter()
    {
        $formatter = function($line) {
            $line['online'] = $this->isOnline($line['lastActivity']);
            $line['intervalLastLogin'] = $this->getIntervalLastLogin($line['lastLogin']);
            $line['lastActivity'] = '';
            return $line;
        };
        
        return $formatter;
    }
1226463
public function currentLine() {
        if (empty($this->EOF) || $this->char == 0) {
            return 1;
        }
        // Add one to $this->char because we want the number for the next
        // byte to be processed.
        return substr_count($this->data, "\n", 0, min($this->char, $this->EOF)) + 1;
    }
663950
public function asStringWithNonDefaultPort(): string
    {
        if ($this->parsedUri->hasPort() && !$this->hasDefaultPort()) {
            return $this->asString();
        }

        return $this->asStringWithoutPort();
    }
175189
public function readLine()
    {
        $out = $this->read();
        if ($this->withHeader && is_array($out)) {
            $out = array_combine($this->header, $out);
        }
        return $out;
    }
122655
public function getGitHooksDir(): string
    {
        $gitPath = $this->getGitDir();
        $absoluteGitPath = $this->getAbsolutePath($gitPath);
        $gitRepoPath = $absoluteGitPath.'/.git';

        if (is_file($gitRepoPath)) {
            $fileContent = $this->fileSystem->readFromFileInfo(new SplFileInfo($gitRepoPath));
            if (preg_match('/gitdir:\s+(\S+)/', $fileContent, $matches)) {
                $relativePath = $this->getRelativePath($matches[1]);
                return $this->getRelativePath($gitPath.$relativePath.'/hooks/');
            }
        }

        return $gitPath.'.git/hooks/';
    }
1036127
protected function getChar()
    {
        // Check to see if we had anything in the look ahead buffer and use that.
        if (isset($this->c)) {
            $char = $this->c;
            unset($this->c);

        // Otherwise we start pulling from the input.
        } else {
            $char = substr($this->input, $this->index, 1);

            // If the next character doesn't exist return false.
            if (isset($char) && $char === false) {
                return false;
            }

            // Otherwise increment the pointer and use this char.
            $this->index++;
        }

        // Normalize all whitespace except for the newline character into a
        // standard space.
        if($char !== "\n" && ord($char) < 32)

            return ' ';

        return $char;
    }