1MONGOC_GRIDFS_BUCKET_DOWNLOAD_TO_STRlEiMAbOMmN(oG3nO)gCo_cGRIDFS_BUCKET_DOWNLOAD_TO_STREAM(3)
2
3
4

SYNOPSIS

6          bool
7          mongoc_gridfs_bucket_download_to_stream (mongoc_gridfs_bucket_t *bucket,
8                                                   const bson_value_t *file_id,
9                                                   mongoc_stream_t *destination,
10                                                   bson_error_t *error);
11

PARAMETERS

13bucket: A mongoc_gridfs_bucket_t.
14
15file_id: A bson_value_t of the id of the file to download.
16
17destination:  A  mongoc_stream_t  which  receives data from the down‐
18         loaded file.
19
20error: A bson_error_t to receive any error or NULL.
21

DESCRIPTION

23       Reads from the GridFS file and writes to the destination stream.
24
25       Writes the full contents of the file to the  destination  stream.   The
26       destination      stream     is     not     closed     after     calling
27       mongoc_gridfs_bucket_download_to_stream();  call  mongoc_stream_close()
28       after.
29
30       This  function  is considered a retryable read operation.  Upon a tran‐
31       sient error (a network error, errors due to replica set failover, etc.)
32       the  operation  is  safely retried once.  If retryreads is false in the
33       URI (see mongoc_uri_t) the retry behavior does not apply.
34

RETURNS

36       True if the operation succeeded. False otherwise, and sets error.
37
38       SEE ALSO:
39          mongoc_stream_file_new() and mongoc_stream_file_new_for_path(), which can be used to create a destination stream from a file.
40
41

AUTHOR

43       MongoDB, Inc
44
46       2017-present, MongoDB, Inc
47
48
49
50
511.25.1                           NovM0O8N,GO2C0_2G3RIDFS_BUCKET_DOWNLOAD_TO_STREAM(3)
Impressum