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

NAME

6       mongoc_gridfs_bucket_download_to_stream   -  mongoc_gridfs_bucket_down‐
7       load_to_stream()
8

SYNOPSIS

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

PARAMETERS

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

DESCRIPTION

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
31       mongoc_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

RETURNS

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

AUTHOR

47       MongoDB, Inc
48
50       2017-present, MongoDB, Inc
51
52
53
54
551.23.1                           OctM2O0N,GO2C0_2G2RIDFS_BUCKET_DOWNLOAD_TO_STREAM(3)
Impressum