1MONGOC_GRIDFS_BUCKET_DOWNLOAD_TOM_oSnTgRoEDMABOMN(CG3O)DCr_iGvReIrDFS_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

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

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

SEE ALSO

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

RETURNS

44       True if the operation succeeded. False otherwise, and sets error.
45

AUTHOR

47       MongoDB, Inc
48
50       2017-present, MongoDB, Inc
51
52
53
54
551.15.2                           NovM0O6N,GO2C0_1G9RIDFS_BUCKET_DOWNLOAD_TO_STREAM(3)
Impressum