mongoc_client_get_gridfs - Man Page

Synopsis

mongoc_gridfs_t *
mongoc_client_get_gridfs (mongoc_client_t *client,
                          const char *db,
                          const char *prefix,
                          bson_error_t *error) BSON_GNUC_WARN_UNUSED_RESULT;

The mongoc_client_get_gridfs() function shall create a new mongoc_gridfs_t. The db parameter is the name of the database which the gridfs instance should exist in. The prefix parameter corresponds to the gridfs collection namespacing; its default is "fs", thus the default GridFS collection names are "fs.files" and "fs.chunks".

Parameters

Errors

Errors are propagated via the error parameter.

Returns

On success, returns a mongoc_gridfs_t you must free with mongoc_gridfs_destroy(). Returns NULL upon failure and sets error.

Author

MongoDB, Inc

Info

Apr 03, 2024 1.26.2 libmongoc