Home

Traffic Server Software Developers Kit

INKfgets

Reads a line from a file to a buffer.

Prototype

char* INKfgets (INKFile filep, char *buf, int length)

Arguments

filep is the file to read from.

buf is the buffer to read into.

length is the size of the buffer to read into.

Description

Reads a line from the file pointed to by filep into the buffer buf. Lines are terminated by a line feed character, \n. The line placed in the buffer includes the line feed character; it is terminated with a NULL. If the line is longer than length bytes, then only the first length - 1 bytes are placed in buf.