'\" t
.\" Title: gfs_pio_seek
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot
.\" Date: 20 Jun 2019
.\" Manual: Gfarm
.\" Source: Gfarm
.\" Language: English
.\"
.TH "GFS_PIO_SEEK" "3" "20 Jun 2019" "Gfarm" "Gfarm"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
gfs_pio_seek \- reposition a stream
.SH "SYNOPSIS"
.sp
.ft B
.nf
#include
.fi
.ft
.HP \w'gfarm_error_t\ gfs_pio_seek('u
.BI "gfarm_error_t\ gfs_pio_seek(GFS_File\ " "gf" ", gfarm_off_t\ " "offset" ", int\ " "whence" ", gfarm_off_t\ *\ " "result" ");"
.SH "DESCRIPTION"
.PP
The
\fBgfs_pio_seek()\fR
function sets the file position indicator for the file
\fIgf\fR\&. The new position, measured in bytes, is obtained by adding
\fIoffset\fR
bytes to the position specified by
\fIwhence\fR\&. If
\fIwhence\fR
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
\fIresult\fR
is not NULL, the new position returns to the address pointed by
\fIresult\fR\&.
.SH "RETURN VALUES"
.PP
\fBGFARM_ERR_NO_ERROR\fR
.RS 4
The function terminated successfully\&.
.RE
.PP
\fBGFARM_ERR_NO_MEMORY\fR
.RS 4
Insufficient memory was available\&.
.RE
.PP
\fBGFARM_ERR_INVALID_ARGUMENT\fR
.RS 4
Specified whence or offset is invalid\&.
.RE
.PP
Other
.RS 4
An error except the above occurred\&. The reason is shown by
\fBgfarm_error_string\fR(3)\&.
.RE
.SH "SEE ALSO"
.PP
\fBgfs_pio_create\fR(3),
\fBgfs_pio_open\fR(3)