mongoc_gridfs_file_seek - Man Page

Synopsis

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

Parameters

Description

Adjust the file position pointer in the given file by delta, starting from the position whence. The whence argument is interpreted as in fseek(2):

SEEK_SETSet the position relative to the start of the file.
SEEK_CURMove delta relative to the current file position.
SEEK_ENDMove delta relative to the end of the file.

On success, the file's underlying position pointer is set appropriately. On failure, the file position is NOT changed and errno is set to indicate the error.

Errors

EINVALwhence is not one of SEEK_SET, SEEK_CUR or SEEK_END.
EINVALThe resulting file position would be negative.

Returns

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

Author

MongoDB, Inc

Info

Nov 07, 2024 1.29.0 libmongoc