MONGOC_GRIDFS_FILE_SEEK(3)
π MONGOC_GRIDFS_FILE_SEEK(3) β a libmongoc baddie π
β¨ SYNOPSIS β¨
okay so here's the signature, bestie β copy it exactly, no autocorrect energy: π
int
mongoc_gridfs_file_seek (mongoc_gridfs_file_t *file, int64_t delta, int whence);
π PARAMETERS π
fileβ amongoc_gridfs_file_t. That's the file you're moving around in. πdeltaβ the amount to move the file position. May be positive or negative. β¨whenceβ one ofSEEK_SET,SEEK_CURorSEEK_END. Pick your starting-point vibe. π―
π¦ DESCRIPTION π¦
Okay so here's the tea: 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_SETβ set the position relative to the start of the file. β¨SEEK_CURβ movedeltarelative to the current file position. π«SEEK_ENDβ movedeltarelative 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 π
EINVALβwhenceis not one ofSEEK_SET,SEEK_CURorSEEK_END. Wrong starting point, bestie. πEINVALβ the resulting file position would be negative. No negative positions allowed, periodt. π
π RETURNS π
Returns 0 if successful; otherwise -1 and errno is set. That's the whole return vibe. π«Ά
πΈ AUTHOR πΈ
MongoDB, Inc β the icon behind it all. π
π COPYRIGHT π
2009-present, MongoDB, Inc. protected and precious. π
xoxo, your Unix bestie π§ β this page is from libmongoc version 2.5.6, dated Oct 09, 2026. periodt. π
π¦ where this page comes from
- epel 10: mongo-c-driver-devel 2.5.6-1.el10_3 Β· Apache-2.0 AND ISC AND MIT AND Zlib
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms