.\" Man page generated from reStructuredText. . . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .TH "MONGOC_GRIDFS_BUCKET_NEW" "3" "May 07, 2024" "1.27.1" "libmongoc" .SH SYNOPSIS .INDENT 0.0 .INDENT 3.5 .sp .EX mongoc_gridfs_bucket_t * mongoc_gridfs_bucket_new (mongoc_database_t *db, const bson_t *opts, const mongoc_read_prefs_t *read_prefs, bson_error_t* error) BSON_GNUC_WARN_UNUSED_RESULT; .EE .UNINDENT .UNINDENT .SH PARAMETERS .INDENT 0.0 .IP \(bu 2 \fBdb\fP: A \fI\%mongoc_database_t\fP\&. .IP \(bu 2 \fBopts\fP: A \fI\%bson_t\fP or \fBNULL\fP .IP \(bu 2 \fBread_prefs\fP: A \fI\%mongoc_read_prefs_t\fP used for read operations or \fBNULL\fP to inherit read preferences from \fBdb\fP\&. .IP \(bu 2 \fBerror\fP: A \fI\%bson_error_t\fP or \fBNULL\fP\&. .UNINDENT .sp \fBopts\fP may be NULL or a BSON document with additional command options: .INDENT 0.0 .IP \(bu 2 \fBbucketName\fP: A UTF\-8 string used as the prefix to the GridFS \(dqchunks\(dq and \(dqfiles\(dq collections. Defaults to \(dqfs\(dq. The bucket name, together with the database and suffix collections must not exceed 120 characters. See the manual for \fI\%the max namespace length\fP\&. .IP \(bu 2 \fBchunkSizeBytes\fP: An \fBint32\fP representing the chunk size. Defaults to 255KB. .IP \(bu 2 \fBwriteConcern\fP: Construct a \fI\%mongoc_write_concern_t\fP and use \fI\%mongoc_write_concern_append()\fP to add the write concern to \fBopts\fP\&. See the example code for \fI\%mongoc_client_write_command_with_opts()\fP\&. .IP \(bu 2 \fBreadConcern\fP: Construct a \fI\%mongoc_read_concern_t\fP and use \fI\%mongoc_read_concern_append()\fP to add the read concern to \fBopts\fP\&. See the example code for \fI\%mongoc_client_read_command_with_opts()\fP\&. Read concern requires MongoDB 3.2 or later, otherwise an error is returned. .UNINDENT .SH DESCRIPTION .sp Creates a new \fI\%mongoc_gridfs_bucket_t\fP\&. Use this handle to perform GridFS operations. .SH RETURNS .sp A newly allocated \fI\%mongoc_gridfs_bucket_t\fP that should be freed with \fI\%mongoc_gridfs_bucket_destroy()\fP or \fBNULL\fP on failure. .SH AUTHOR MongoDB, Inc .SH COPYRIGHT 2017-present, MongoDB, Inc .\" Generated by docutils manpage writer. .