1MONGOC_GRIDFS_FILE_SEEK(3)         libmongoc        MONGOC_GRIDFS_FILE_SEEK(3)
2
3
4

SYNOPSIS

6          int
7          mongoc_gridfs_file_seek (mongoc_gridfs_file_t *file, int64_t delta, int whence);
8

PARAMETERS

10file: A mongoc_gridfs_file_t.
11
12delta: The amount to move the file position. May be positive or nega‐
13         tive.
14
15whence: One of SEEK_SET, SEEK_CUR or SEEK_END.
16

DESCRIPTION

18       Adjust the file position pointer in the given file by  delta,  starting
19       from  the  position  whence.  The  whence argument is interpreted as in
20       fseek(2):
21
22                       ┌─────────┬────────────────────────────┐
23SEEK_SET │ Set the position  relative │
24                       │         │ to the start of the file.  │
25                       ├─────────┼────────────────────────────┤
26SEEK_CUR │ Move delta relative to the │
27                       │         │ current file position.     │
28                       ├─────────┼────────────────────────────┤
29SEEK_END │ Move delta relative to the │
30                       │         │ end of the file.           │
31                       └─────────┴────────────────────────────┘
32
33       On  success,  the  file's  underlying position pointer is set appropri‐
34       ately. On failure, the file position is NOT changed and errno is set to
35       indicate the error.
36

ERRORS

38                        ┌───────┬────────────────────────────┐
39EINVAL whence   is   not  one  of │
40                        │       │ SEEK_SET,   SEEK_CUR    or │
41                        │       │ SEEK_END.                  │
42                        ├───────┼────────────────────────────┤
43EINVAL │ The  resulting  file posi‐ │
44                        │       │ tion would be negative.    │
45                        └───────┴────────────────────────────┘
46

RETURNS

48       Returns 0 if successful; otherwise -1 and errno is set.
49

AUTHOR

51       MongoDB, Inc
52
54       2017-present, MongoDB, Inc
55
56
57
58
591.25.1                           Nov 08, 2023       MONGOC_GRIDFS_FILE_SEEK(3)
Impressum