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