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 β€” a mongoc_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 of SEEK_SET, SEEK_CUR or SEEK_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 β€” move delta relative to the current file position. πŸ’«
  • SEEK_END β€” move 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 πŸ’€

  • EINVAL β€” whence is not one of SEEK_SET, SEEK_CUR or SEEK_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. πŸ’œ

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