---
name: "gfs_pio_getline"
section: "3"
platform: "linux"
package: "libgfarm-dev"
version: "2.4.1-1.1"
release: "Debian 7 (Wheezy)"
platforms: ["linux"]
url: "https://new.carta.tech/gfs_pio_getline"
---

# gfs\_pio\_getline(3)

read a line

## NAME

gfs\_pio\_getline - read a line

## SYNOPSIS

**#include \<gfarm/gfarm.h\>**

**char \*gfs\_pio\_getline (GFS\_File** *f***, char \*** *s***, size\_t** *size***, int \*** *eofp***);**

## DESCRIPTION

**gfs\_pio\_getline()** reads a line from the file *gf*, and stores to the buffer starting at *s* at most *size* - 1 bytes.  It is indistinguishable whether the length of a line is more than *size* or equal to *size* - 1.  It sets 1 into the address pointed by *eofp* on end of file, otherwise it sets 0.

## RETURN VALUES

- **NULL**

  The function terminated successfully.

- **GFARM\_ERR\_NO\_MEMORY**

  Insufficient memory was available.

- **Others**

  An error except the above occurred.  The reason is shown by its pointed strings.

## SEE ALSO

[**gfs\_pio\_create**(3)](/gfs_pio_create/3.md), [**gfs\_pio\_open**(3)](/gfs_pio_open/3.md)
