Platforms to show: All Mac Windows Linux Cross-Platform

MongoGridFSMBS class   New in 25.2

Type Topic Plugin Version macOS Windows Linux iOS Targets
class MongoDB MBS MongoDB Plugin 25.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
This class provides a MongoDB gridfs implementation.

The system as a whole is made up of gridfs objects, which contain gridfs files and gridfs file lists. Essentially, a basic file system API.

There are extensive caveats about the kind of use cases gridfs is practical for. In particular, any writing after initial file creation is likely to both break any concurrent readers and be quite expensive. That said, this implementation does allow for arbitrary writes to existing gridfs object, just use them with caution.

mongoc_gridfs also integrates tightly with the MongoStreamMBS class abstraction, which provides some convenient wrapping for file creation and reading/writing. It can be used without, but its worth looking to see if your problem can fit that model.

MongoGridFSMBS is NOT thread-safe and should only be used in the same thread as the owning MongoClientMBS.
This is an abstract class. You can't create an instance, but you can get one from various plugin functions.

This class has no sub classes.

Blog Entries

Release notes

  • Version 25.2
    • Added MongoStreamMBS, MongoGridFSFileMBS, MongoGridFSFileListMBS, MongoGridFSFileOptionsMBS and MongoGridFSMBS classes.

Some methods using this class:

Some related classes:


The items on this page are in the following plugins: MBS MongoDB Plugin.


MongoGridFSFileOptionsMBS   -   MongoHostListMBS


The biggest plugin in space...