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