Skip site navigation (1)Skip section navigation (2)

  
 
  

home | help
MONGOC_GRIDFS_BUCKET_NEW(3)	    libmongoc	     MONGOC_GRIDFS_BUCKET_NEW(3)

SYNOPSIS
	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);

PARAMETERS
     * db: A mongoc_database_t.

     * opts: A bson_t or NULL

     * read_prefs: A mongoc_read_prefs_t used for read operations or NULL to in-
       herit read preferences from db.

     * error: A bson_error_t or NULL.

     opts may be NULL or a BSON document with additional command options:

     * bucketName:  A UTF-8 string used as the prefix to the GridFS "chunks" and
       "files" collections. Defaults to "fs". The bucket name, together with the
       database and suffix collections must not exceed 120 characters.	See  the
       manual for the max namespace length.

     * chunkSizeBytes: An int32 representing the chunk size. Defaults to 255KB.

     * writeConcern:	 Construct     a    mongoc_write_concern_t    and    use
       mongoc_write_concern_append() to add the write concern to opts.	See  the
       example code for mongoc_client_write_command_with_opts().

     * readConcern:	Construct     a     mongoc_read_concern_t     and    use
       mongoc_read_concern_append() to add the read concern to opts. See the ex-
       ample code for mongoc_client_read_command_with_opts(). Read  concern  re-
       quires MongoDB 3.2 or later, otherwise an error is returned.

DESCRIPTION
     Creates a new mongoc_gridfs_bucket_t. Use this handle to perform GridFS op-
     erations.

RETURNS
     A	 newly	allocated  mongoc_gridfs_bucket_t  that  should  be  freed  with
     mongoc_gridfs_bucket_destroy() or NULL on failure.

AUTHOR
     MongoDB, Inc

COPYRIGHT
     2009-present, MongoDB, Inc.

1.30.8				  Aug 27, 2026	     MONGOC_GRIDFS_BUCKET_NEW(3)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=mongoc_gridfs_bucket_new&sektion=3&manpath=FreeBSD+Ports+15.1.quarterly>

home | help