1MONGOC_GRIDFS_FIND_ONE_BY_FILENAME(3l)ibmongMoOcNGOC_GRIDFS_FIND_ONE_BY_FILENAME(3)
2
3
4
6 mongoc_gridfs_file_t *
7 mongoc_gridfs_find_one_by_filename (mongoc_gridfs_t *gridfs,
8 const char *filename,
9 bson_error_t *error)
10 BSON_GNUC_WARN_UNUSED_RESULT;
11
13 • gridfs: A mongoc_gridfs_t.
14
15 • filename: A UTF-8 encoded string containing the filename.
16
17 • error: An optional location for a bson_error_t or NULL.
18
20 Finds the first file matching the filename specified. If there is an
21 error, NULL is returned and error is filled out; if there is no error
22 but no matching file is found, NULL is returned and the error code and
23 domain are 0.
24
25 This function is considered a retryable read operation. Upon a tran‐
26 sient error (a network error, errors due to replica set failover, etc.)
27 the operation is safely retried once. If retryreads is false in the
28 URI (see mongoc_uri_t) the retry behavior does not apply.
29
31 Errors are propagated via the error parameter.
32
34 Returns a newly allocated mongoc_gridfs_file_t if successful. You must
35 free the resulting file with mongoc_gridfs_file_destroy() when no
36 longer in use.
37
39 MongoDB, Inc
40
42 2017-present, MongoDB, Inc
43
44
45
46
471.25.1 Nov 08, 2M0O2N3GOC_GRIDFS_FIND_ONE_BY_FILENAME(3)