1MONGOC_CLIENT_GET_GRIDFS(3) libmongoc MONGOC_CLIENT_GET_GRIDFS(3)
2
3
4
6 mongoc_client_get_gridfs - mongoc_client_get_gridfs()
7
9 mongoc_gridfs_t *
10 mongoc_client_get_gridfs (mongoc_client_t *client,
11 const char *db,
12 const char *prefix,
13 bson_error_t *error) BSON_GNUC_WARN_UNUSED_RESULT;
14
15 The mongoc_client_get_gridfs() function shall create a new mon‐
16 goc_gridfs_t. The db parameter is the name of the database which the
17 gridfs instance should exist in. The prefix parameter corresponds to
18 the gridfs collection namespacing; its default is "fs", thus the de‐
19 fault GridFS collection names are "fs.files" and "fs.chunks".
20
22 • client: A mongoc_client_t.
23
24 • db: The database name.
25
26 • prefix: Optional prefix for gridfs collection names or NULL.
27
28 • error: An optional location for a bson_error_t or NULL.
29
31 Errors are propagated via the error parameter.
32
34 On success, returns a mongoc_gridfs_t you must free with mon‐
35 goc_gridfs_destroy(). Returns NULL upon failure and sets error.
36
38 MongoDB, Inc
39
41 2017-present, MongoDB, Inc
42
43
44
45
461.21.1 Mar 02, 2022 MONGOC_CLIENT_GET_GRIDFS(3)