MONGOC_STREAM_FILE_NEW_FOR_PATH(3)

Okay bestie, welcome to the MONGOC_STREAM_FILE_NEW_FOR_PATH(3) page from libmongoc β€” it’s giving β€œmake a new mongoc_stream_file_t by opening a file” energy, and we’re obsessed. βœ¨πŸ’…

πŸŽ€ SYNOPSIS πŸŽ€

mongoc_stream_t *
mongoc_stream_file_new_for_path (const char *path,
                                 int flags,
                                 int mode);

🌸 PARAMETERS 🌸

  • path β€” the path of the target file. Literally where the file lives, bestie. πŸ›€οΈ
  • flags β€” flags to be passed to open(). Yes, those flags. πŸ‘‘
  • mode β€” an optional mode to be passed to open() when creating a file. It’s optional, so don’t stress. πŸŽ€

This function shall create a new mongoc_stream_file_t after opening the underlying file with open() or the platform equivalent. No cap. πŸ’…

πŸ’– RETURNS πŸ’–

NULL on failure, otherwise a newly allocated mongoc_stream_file_t that should be freed with mongoc_stream_destroy() when no longer in use. Free your stuff, bestie β€” it’s giving responsible main character energy. 🫢

errno is set upon failure. So if it flops, check errno, iykyk. 😭

✨ AUTHOR ✨

MongoDB, Inc. Iconic. πŸ‘‘

2009-present, MongoDB, Inc. Periodt. πŸ’œ


This little page came from libmongoc version 2.5.6, dated Oct 09, 202 in the footer β€” love that for us. Go forth and free your mongoc_stream_file_t, bestie! πŸ’–βœ¨

πŸ“¦ where this page comes from