1RFIO_FSEEK(3)               Rfio Library Functions               RFIO_FSEEK(3)
2
3
4

NAME

6       rfio_fseek - positions/repositions a file
7

SYNOPSIS

9       #include <sys/types.h>
10       #include "rfio_api.h"
11
12       int rfio_fseek (FILE *fp, long offset, int whence);
13
14       Under Linux, for large files:
15       #define _LARGEFILE64_SOURCE
16       #include <sys/types.h>
17       #include "rfio_api.h"
18
19       int rfio_fseeko64 (FILE *fp, off64_t offset, int whence);
20
21       For large files, under other systems:
22       #include <sys/types.h>
23       #include "rfio_api.h"
24
25       int rfio_fseeko64 (FILE *fp, off64_t offset, int whence);
26

DESCRIPTION

28       rfio_fseek positions/repositions to offset the file associated with the
29       descriptor fp generated by a previous rfio_fopen.  whence indicates how
30       to interpret the offset value:
31
32              SEEK_SET     The offset is set from beginning of file.
33
34              SEEK_CUR     The offset is added to current position.
35
36              SEEK_END     The offset is added to current file size.
37       rfio_fseeko64  can  be used with large files and allows to use a 64 bit
38       offset rather than a long.
39

RETURN VALUE

41       This routine returns 0 if the operation was successful  or  -1  if  the
42       operation failed. In the latter case, serrno is set appropriately.
43

ERRORS

45       EBADF        fp is not a valid descriptor.
46
47       EINVAL       incorrect value for whence.
48
49       SENOSHOST    Host unknown.
50
51       SENOSSERV    Service unknown.
52
53       SETIMEDOUT   Timed out.
54
55       SEBADVERSION Version ID mismatch.
56
57       SEINTERNAL   Internal error.
58
59       SECONNDROP   Connection closed by remote end.
60
61       SECOMERR     Communication error.
62

SEE ALSO

64       rfio_fopen(3)
65

AUTHOR

67       LCG Grid Deployment Team
68
69
70
71LCG                      $Date: 2005/03/31 13:13:02 $            RFIO_FSEEK(3)
Impressum