Content-type: text/html
Man page of GFAL_LSEEK
GFAL_LSEEK
Section: Library Functions (3)
Updated: $Date: 2003/11/19 12:56:29 $
Index
Return to Main Contents
NAME
gfal_lseek - position a file
SYNOPSIS
#include "gfal_api.h"
off_t gfal_lseek (int fd,
off_t offset,
int whence);
Under Linux, for large files:
#define _LARGEFILE64_SOURCE
#include "gfal_api.h"
off64_t gfal_lseek64 (int fd,
off64_t offset,
int whence);
For large files, under other systems:
#include "gfal_api.h"
off64_t gfal_lseek64 (int fd,
off64_t offset,
int whence);
DESCRIPTION
gfal_lseek
positions/repositions to
offset
the file associated with the descriptor
fd
generated by a previous
gfal_open.
whence
indicates how to interpret the
offset
value:
-
- SEEK_SET
-
The offset is set from beginning of file.
- SEEK_CUR
-
The offset is added to current position.
- SEEK_END
-
The offset is added to current file size.
gfal_lseek64
performs the same function on large files using off64_t rather than off_t.
RETURN VALUE
This routine returns the actual offset from the beginning of the file if the
operation was successful or -1 if the operation failed. In the latter case,
errno
is set appropriately.
ERRORS
- EBADF
-
fd
is not a valid file descriptor.
- EINVAL
-
incorrect value for
whence.
- EFBIG
-
Resulting offset is too big to fit in off_t.
- ECOMM
-
Communication error.
- EPROTONOSUPPORT
-
Access method not supported.
SEE ALSO
gfal(3)
Index
- NAME
-
- SYNOPSIS
-
- DESCRIPTION
-
- RETURN VALUE
-
- ERRORS
-
- SEE ALSO
-
This document was created by
man2html,
using the manual pages.
Time: 14:16:31 GMT, July 14, 2009