gfs_pio_seek(3)

gfs_pio_seek3

Reposition a stream

Usage

#include <gfarm/gfarm.h>

gfarm_error_t gfs_pio_seek(GFS_File gf, gfarm_off_t offset, int whence, gfarm_off_t * result);

Overview

The gfs_pio_seek() function sets the file position indicator for the file gf. The new position, measured in bytes, is obtained by adding offset bytes to the position specified by whence. If whence is set to GFARM_SEEK_SET, GFARM_SEEK_CUR, or GFARM_SEEK_END, the offset is relative to the start of the file, the current position indicator, or end-of-file, respectively. When result is not NULL, the new position returns to the address pointed by result.

Return values

GFARM_ERR_NO_ERROR

The function terminated successfully.

GFARM_ERR_NO_MEMORY

Insufficient memory was available.

GFARM_ERR_INVALID_ARGUMENT

Specified whence or offset is invalid.

Other

An error except the above occurred. The reason is shown by gfarm_error_string(3).

Releases

5 releases since Debian 6.0 (Squeeze); the text changed 1 time.

  1. 6.0–7
  2. 11–13

From libgfarm-dev 2.7.20+dfsg-1.2+b1 in Debian 13 (Trixie). Parsed by carta from the page's man source.