1MONGOC_GRIDFS_BUCKET_DOWNLOAD_TO_STRlEiMAbOMmN(oG3nO)gCo_cGRIDFS_BUCKET_DOWNLOAD_TO_STREAM(3)
2
3
4
6 mongoc_gridfs_bucket_download_to_stream - mongoc_gridfs_bucket_down‐
7 load_to_stream()
8
10 bool
11 mongoc_gridfs_bucket_download_to_stream (mongoc_gridfs_bucket_t *bucket,
12 const bson_value_t *file_id,
13 mongoc_stream_t *destination,
14 bson_error_t *error);
15
17 · bucket: A mongoc_gridfs_bucket_t.
18
19 · file_id: A bson_value_t of the id of the file to download.
20
21 · destination: A mongoc_stream_t which receives data from the down‐
22 loaded file.
23
24 · error: A bson_error_t to receive any error or NULL.
25
27 Reads from the GridFS file and writes to the destination stream.
28
29 Writes the full contents of the file to the destination stream. The
30 destination stream is not closed after calling mon‐
31 goc_gridfs_bucket_download_to_stream(); call mongoc_stream_close()
32 after.
33
34 This function is considered a retryable read operation. Upon a tran‐
35 sient error (a network error, errors due to replica set failover, etc.)
36 the operation is safely retried once. If retryreads is false in the
37 URI (see mongoc_uri_t) the retry behavior does not apply.
38
40 mongoc_stream_file_new and mongoc_stream_file_new_for_path, which can
41 be used to create a destination stream from a file.
42
44 True if the operation succeeded. False otherwise, and sets error.
45
47 MongoDB, Inc
48
50 2017-present, MongoDB, Inc
51
52
53
54
551.16.2 FebM2O5N,GO2C0_2G0RIDFS_BUCKET_DOWNLOAD_TO_STREAM(3)