1MONGOC_GRIDFS_FIND_ONE_BY_FILENAME(3l)ibmongMoOcNGOC_GRIDFS_FIND_ONE_BY_FILENAME(3)
2
3
4

NAME

6       mongoc_gridfs_find_one_by_filename   -  mongoc_gridfs_find_one_by_file‐
7       name()
8

SYNOPSIS

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             BSON_GNUC_WARN_UNUSED_RESULT;
15

PARAMETERS

17gridfs: A mongoc_gridfs_t.
18
19filename: A UTF-8 encoded string containing the filename.
20
21error: An optional location for a bson_error_t or NULL.
22

DESCRIPTION

24       Finds the first file matching the filename specified. If  there  is  an
25       error,  NULL  is returned and error is filled out; if there is no error
26       but no matching file is found, NULL is returned and the error code  and
27       domain are 0.
28
29       This  function  is considered a retryable read operation.  Upon a tran‐
30       sient error (a network error, errors due to replica set failover, etc.)
31       the  operation  is  safely retried once.  If retryreads is false in the
32       URI (see mongoc_uri_t) the retry behavior does not apply.
33

ERRORS

35       Errors are propagated via the error parameter.
36

RETURNS

38       Returns a newly allocated mongoc_gridfs_file_t if successful. You  must
39       free  the  resulting  file  with  mongoc_gridfs_file_destroy()  when no
40       longer in use.
41

AUTHOR

43       MongoDB, Inc
44
46       2017-present, MongoDB, Inc
47
48
49
50
511.20.0                           Nov 18, 2M0O2N1GOC_GRIDFS_FIND_ONE_BY_FILENAME(3)
Impressum