47 std::int32_t chunks_offset = 0;
48 std::int32_t bytes_offset = 0;
98 return std::move(_downloader);
110 explicit operator
bool() const noexcept {
111 return _downloader.operator bool();
181 return {std::move(v)};
A read-only, non-owning view of a BSON document.
Definition view.hpp:40
downloader() noexcept
Default constructs a downloader object. The downloader is equivalent to the state of a moved from dow...
Definition downloader.hpp:64
Support for downloading files from a GridFS bucket.
Definition downloader.hpp:44
Used to download a GridFS file.
Definition downloader.hpp:54
downloader & operator=(downloader &&other) noexcept=default
Move assigns a downloader.
downloader() noexcept
Default constructs a downloader object. The downloader is equivalent to the state of a moved from dow...
Definition downloader.hpp:64
bsoncxx::v_noabi::document::view files_document() const
Gets the files collection document of the file being downloaded.
downloader(downloader &&other) noexcept=default
Move constructs a downloader.
~downloader()=default
Destroys a downloader.
std::int32_t chunk_size() const
Gets the chunk size of the file being downloaded.
downloader(v1::gridfs::downloader downloader)
Construct with the mongocxx::v1 equivalent.
Definition downloader.hpp:87
void close()
Closes the downloader stream.
std::size_t read(std::uint8_t *buffer, std::size_t length)
Reads a specified number of bytes from the GridFS file being downloaded.
std::int64_t file_length() const
Gets the length of the file being downloaded.
#define MONGOCXX_ABI_EXPORT_CDECL(...)
Equivalent to MONGOCXX_ABI_EXPORT with MONGOCXX_ABI_CDECL.
Definition export.hpp:52
The mongocxx v_noabi macro guard postlude header.
The mongocxx v_noabi macro guard prelude header.
Declares entities related to GridFS.
Declares entities whose ABI stability is NOT guaranteed.
v1::bulk_write to_v1(v_noabi::bulk_write v)
Convert to the mongocxx::v1 equivalent of v.
Definition bulk_write.hpp:162
v_noabi::bulk_write from_v1(v1::bulk_write v)
Convert to the mongocxx::v_noabi equivalent of v.
Definition bulk_write.hpp:155
The top-level namespace within which all mongocxx library entities are declared.
Used to specify the offset from which to start reading the chunks of the file.
Definition downloader.hpp:46
Provides mongocxx::v1::gridfs::downloader.
Provides bsoncxx::v_noabi::document::value.
Provides bsoncxx::v_noabi::document::view.
Provides std::optional-related polyfills for library API usage.
Provides bsoncxx::v_noabi::types::bson_value::view.
Provides mongocxx::v_noabi::cursor.
Declares mongocxx::v_noabi::gridfs::bucket.
Declares utilities to download GridFS files.