SYNOPSIS
int mongoc_gridfs_file_seek (mongoc_gridfs_file_t *file, uint64_t delta, int whence); uint64_t mongoc_gridfs_file_tell (mongoc_gridfs_file_t *file);
DESCRIPTION
mongoc_gridfs_file_seek()
The mongoc_gridfs_file_seek() function mimics fseek(3).
- delta
-
The relative offset into the file. Correlates with whence
- whence
-
An fseek(3) style whence.
- SEEK_SET
-
Relative to the start of the file
- SEEK_CUR
-
Relative to the current position indicator
- SEEK_END
-
Relative to the end of file
mongoc_gridfs_file_tell()
The mongoc_gridfs_file_tell() function returns the current value of the file position indicator in file.
RETURN VALUE
The mongoc_gridfs_file_seek() function returns 0 on success, -1 on failure.
The mongoc_gridfs_file_tell() function returns the current offset.
ERRORS
- EINVAL
-
The whence argument to mongoc_gridfs_file_seek() was not SEEK_SET, SEEK_END or SEEK_CUR.
SEE ALSO
AUTHORS
This page was written by MongoDB Inc.