mongoc_gridfs_bucket_new()#

Synopsis#

mongoc_gridfs_bucket_t *
mongoc_gridfs_bucket_new (mongoc_database_t *db,
                          const bson_t *opts,
                          const mongoc_read_prefs_t *read_prefs,
                          bson_error_t* error) BSON_GNUC_WARN_UNUSED_RESULT;

Parameters#

opts may be NULL or a BSON document with additional command options:

Description#

Creates a new mongoc_gridfs_bucket_t. Use this handle to perform GridFS operations.

Returns#

A newly allocated mongoc_gridfs_bucket_t that should be freed with mongoc_gridfs_bucket_destroy() or NULL on failure.